0 == False but [] != False?

Steven D'Aprano steve at REMOVE.THIS.cybersource.com.au
Thu May 24 06:51:02 EDT 2007


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"?


-- 
Steven.




More information about the Python-list mailing list