From: martin@v.loewis.de (Martin v. Loewis)
Replying To: Hans Nowak <wurmy@earthlink.net>
Date: 08 Mar 2002 19:31:24 +0100
Subject: Re: [Python-Dev] For review: PEP 285: Adding a bool type

"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 

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev