[Python-Dev] Boolean transition

David Abrahams David Abrahams" <david.abrahams@rcn.com
Sat, 9 Mar 2002 17:22:38 -0500


This rubs my expectations the right way. Does it foreshadow the
introduction of boolean operators (e.g. &, |, &&, ||)?

-Dave

----- Original Message -----
From: "Paul Prescod" <paul@prescod.net>
To: <python-dev@python.org>
Sent: Saturday, March 09, 2002 5:06 PM
Subject: [Python-Dev] Boolean transition


> 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
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> http://mail.python.org/mailman/listinfo/python-dev
>