easy question on parsing python: "is not None"

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Aug 6 21:41:03 EDT 2010


Steven D'Aprano wrote:
> Generally, 
> when testing for None, you actually want None and not some look-alike 
> that merely tests equal to None.

That's true, although I can't think of a use case for an object
that compares equal to None but isn't -- except for obfuscated
code competition entries and making obscure points in usenet
discussions. :-)

-- 
Greg



More information about the Python-list mailing list