Test None for an object that does not implement ==
Roy Smith
roy at panix.com
Sun Dec 25 19:27:35 EST 2011
In article <mailman.4082.1324858055.27778.python-list at python.org>,
Devin Jeanpierre <jeanpierreda at gmail.com> wrote:
> The issue here is that "== None" is being used instead of "is None",
> but I believe that's been covered. Your response doesn't include it,
> so maybe it's worth restating.
Which of course leads to a SillyPEP for a new keyword, "are", which
would allow you to write:
>>> a and c are None
instead of the much more verbose
>>> a is None and c is None
More information about the Python-list
mailing list