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: Find a new employer. I'm not joking. > 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 > I have a job as a C++ programmer, and they make us write it like that, regards 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.
| ||||||||||||||