[issue3195] invalid conversion xml.etree.ElementTree.Element object to boolean
Antoine Pitrou
report at bugs.python.org
Wed Jun 25 12:22:59 CEST 2008
Antoine Pitrou <pitrou at free.fr> added the comment:
Indeed, this is not a bug, although it can be misleading.
Generally, if you test for None, it is better to write "if x is None",
it is at the same time more accurate, more explicit for someone reading
your code, and also executes faster than "if not x".
----------
nosy: +pitrou
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3195>
_______________________________________
More information about the Python-bugs-list
mailing list