0 == False but [] != False?
Grant Edwards
grante at visi.com
Thu May 24 10:14:37 EDT 2007
On 2007-05-24, Rex Turnbull <rex at 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 ...
More information about the Python-list
mailing list