[Python-Dev] For review: PEP 285: Adding a bool type
Martin v. Loewis
martin@v.loewis.de
08 Mar 2002 19:31:24 +0100
"Hans Nowak" <wurmy@earthlink.net> writes:
> 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. :-)
Under the proposal, this assumption is wrong. bool is defined as a
subtype of int; 28+True is 29. Just try this code with the reference
implementation given in your code.
Regards,
Martin