[Python-Dev] RE: PEP 285: Adding a bool type
Guido van Rossum
guido at python.org
Sat Mar 30 08:35:11 EST 2002
> > How will bool influence '__nonzero__'? Currently, Python insists that
> > '__nonzero__ should return an int'. Will this be changed to 'should
> > return a bool'?
>
> I hope so.
Actually, it doesn't matter. This is only called by C code that must
then return a *C* 0 or 1, and this code is entirely oblivious to the
difference between int and bool.
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-list
mailing list