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/020795.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 typeGuido van Rossum guido@python.org
Fri, 08 Mar 2002 14:44:38 -0500
> >>> True * 10
> 10
> >>> False * 10
> 0
> 
> If you want to dive into logic here, the only correct output
> would be:
> 
> >>> True * 10
> True
> >>> False * 10
> False

What has logic got to do with this?

> However, this would break even more code... your bool
> type is much more like a bit type (or would have to behave
> like one in order to maintain backwards compatibility).

I never said otherwise.  It behaves exactly like int except for those
operations where the PEP specifies something different.  This is
intentional, since anything else will break too much code.

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



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