boolean OR gotcha
Stephen Hansen
apt.shansen at gmail.com
Tue Aug 4 16:24:46 EDT 2009
>
>
> # Here is something different:
> >>> (0 or None) == (None or 0)
> False
What is the actual problem? You quoted the docs, it seems very clear.
(0 or None) would return None.
(None or 0) would return 0.
None is not equal to 0, of course.
--S
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090804/49987db2/attachment-0001.html>
More information about the Python-list
mailing list