[issue12647] Add __bool__ to None

STINNER Victor report at bugs.python.org
Thu Jul 28 00:36:52 CEST 2011


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> I'm not sure why the special case shouldn't be retained.

We can keep the fast path in PyObject_IsTrue but add a __bool__ method to NoneType.

----------
nosy: +haypo

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12647>
_______________________________________


More information about the Python-bugs-list mailing list