[issue12647] Add __bool__ to None

Antoine Pitrou report at bugs.python.org
Thu Jul 28 00:37:30 CEST 2011


Antoine Pitrou <pitrou at free.fr> 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.

That's what I meant.

----------

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


More information about the Python-bugs-list mailing list