A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-March/020780.html below:

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

[Python-Dev] For review: PEP 285: Adding a bool type [Python-Dev] For review: PEP 285: Adding a bool typeMartin 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



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4