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/020841.html below:

[Python-Dev] Boolean transition

[Python-Dev] Boolean transition [Python-Dev] Boolean transitionPaul Prescod paul@prescod.net
Sat, 09 Mar 2002 14:06:37 -0800
I'm in favour of adding the boolean feature in as compatible a manner as
possible. But I think that we need a transition plan to separate
booleans from integers. Booleans are not integers and
True+True-False+5=6 is just weird. Arithmetic manipulation of booleans
should be deprecated and should fade away. isinstance(True, int) should
be deprecated. etc.

Another strategy is to implement booleans as a totally unrelated type
and phase them into the operators later after people have had time to
change code that adds or subtracts from the result of boolean operators.
The current subtyping strategy provides a better hook for deprecation
warnings. My only concern is that we decide and document that booleans
will one day be as completely unrelated to integers as exceptions are to
strings.

 Paul Prescod



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