[Python-Dev] RE: PEP 285: Adding a bool type

Guido van Rossum guido@python.org
2002年3月30日 08:35:11 -0500


> > 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/)

AltStyle によって変換されたページ (->オリジナル) /