What's wrong with `is not None`?

Frans Englich frans.englich at telia.com
Tue Feb 8 18:14:00 EST 2005


That's what PyChecker tells me, at least. 

A line of:

if testReport is not None:

results in:

runner.py:587: Using is not None, may not always work

In what circumstances can `is not None` fail? How and why does it fail?

What is the equivalent expression which is more secure; `!= None`?


Cheers,

		Frans




More information about the Python-list mailing list