Web Images Videos Maps News Groups Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion 0 == False but [] != False?
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
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Steve Holden  
View profile  
 More options May 25 2007, 9:09 am
Newsgroups: comp.lang.python
From: Steve Holden <st...@holdenweb.com>
Date: Thu, 24 May 2007 19:09:09 -0400
Local: Fri, May 25 2007 9:09 am
Subject: Re: 0 == False but [] != False?
Dan Bishop wrote:
> On May 24, 1:59 am, Tim Roberts <t...@probo.com> wrote:
> ...
>> False is just a constant.  0, (), '', [], and False are all constants that
>> happen to evaluate to a false value in a Boolean context, but they are not
>> all the same.

>> As a general rule, I've found code like "if x == False" to be a bad idea in
>> ANY language.

> I have a job as a C++ programmer, and they make us write it like that,
> apparently because the ! operator is hard to see.  But "if (x ==
> TRUE)" is discouraged.

Find a new employer. I'm not joking.

regards
  Steve
--
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd           http://www.holdenweb.com
Skype: holdenweb      http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com        squidoo.com/pythonology
tagged items:         del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------


    Reply to author    Forward  
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.

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google