[issue2503] Replace "== None/True/False" with "is"

Alexander Belopolsky report at bugs.python.org
Fri Mar 28 15:04:33 CET 2008


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

Despite the title, the patch replaces "result == False" with "not 
result" rather than "result is False".  While probably ok in this 
particular context, this changes the logic.  For example,

>>> result = ""
>>> result == False
False
>>> not result
True

----------
nosy: +belopolsky

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2503>
__________________________________


More information about the Python-bugs-list mailing list