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

Samuele Pedroni pedroni@inf.ethz.ch
Fri, 8 Mar 2002 21:36:55 +0100


From: Guido van Rossum <guido@python.org>
> > but that means that the situation for the
> > user will be *ideally* less muddy only when all
> > the code uses True/False everytime it makes sense,
> > and not 1/0.
>
> Yes, it will take time before everything is converted.  That's why we
> must be careful to decide if we really want this.

Yup, that's what I was thinking about.
(Especially) During the conversion phase:

>> 0 > 1
False
>> import baz
>> bar = baz.Baz()
>> bar.isfoo()
1

will be really less puzzling than

>> 0 > 1
0
>> import baz
>> bar = baz.Baz()
>> bar.isfoo()
1

Or given that the usual truth semantics is still there, is just the first
output
"cosmetically" better /purer, and not really conceptually easier (?).
I have no strong feeling about this, just wondering.

regards.