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

Guido van Rossum guido@python.org
Fri, 08 Mar 2002 13:26:14 -0500


> This may be a minor issue, but this proposal will break code like
> 
>   days_feb = 28 + isleapyear(year)
> 
> assuming that booleans cannot be added to ints. :-)

Re-read the PEP.  bool subclasses int.  28 + True equals 29.

--Guido van Rossum (home page: http://www.python.org/~guido/)