[Python-Dev] For review: PEP 285: Adding a bool type (original) (raw)
Martin v. Loewis martin@v.loewis.de
08 Mar 2002 19:31:24 +0100
- Previous message: [Python-Dev] For review: PEP 285: Adding a bool type
- Next message: [Python-Dev] Re: PEP 285 again -- correction?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Hans Nowak" <wurmy@earthlink.net> writes:
This may be a minor issue, but this proposal will break code like
daysfeb = 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
- Previous message: [Python-Dev] For review: PEP 285: Adding a bool type
- Next message: [Python-Dev] Re: PEP 285 again -- correction?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]