Go to Google Groups Home    comp.lang.python
Re: 0 == False but [] != False?

Grant Edwards <gra...@visi.com>

On 2007-05-24, Rex Turnbull <rex@no_spam.dicad.de> wrote:

> Steven D'Aprano :
>> On Thu, 24 May 2007 06:59:32 +0000, Tim Roberts wrote:

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

>> Surely that should be written as "if (x == False) == True"?

> Why compare to False?

That's a joke... I say, that's a joke, son!

He was being sarcastic.  

--
Grant Edwards                   grante             Yow! The FALAFEL SANDWICH
                                  at               lands on my HEAD and I
                               visi.com            become a VEGETARIAN ...