The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Newsgroups: comp.lang.python
From: Paul McGuire <pt...@austin.rr.com>
Date: 23 May 2007 22:11:22 -0700
Local: Thurs, May 24 2007 3:11 pm
Subject: Re: 0 == False but [] != False?
On May 23, 11:53 pm, Rajarshi <rajarshi.g...@gmail.com> wrote:
> This is a slightly naive question, but I know that 0 can be used to This has *got* to rank up there among the VFAQ's of them all, along > represent False. So > >>> 0 == False > True > But, I know I can use [] to represent False as in > >>> if not []: print 'empty' > ... > But then doing the following gives a surprising (to me!) result > >>> [] == False > False > Could anybody point out why this is the case? > Thanks, with the mysterious shared default empty list argument. I think this particular question has been asked in one form or another at least twice a week for the past month! -- Paul You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||