PEP 285: Adding a bool type

Terry Reedy tejarex at yahoo.com
Mon Apr 1 02:18:44 EST 2002


"Tim Peters" <tim.one at comcast.net> wrote in message
news:mailman.1017632403.21519.python-list at python.org...
> [Terry Reedy]
> > ...
> > My proposal has two parts: do not use 'bool'; do use 'truth' (or
> > possibly something else such as 'binary' or even 'tval').  I am
> > curious what you think of the four reasons I gave.  I am
specifically
> > curious whether you will volunteer to anwer a multiyear stream
> > (already started) of questions about why Python truth values,
being
> > called bool, do not act 'properly' as bools 'should' and
suggestion
> > that they 'ought' to be restricted (crippled) so that they do.
>
> I think this is easy:  I point them at the C99 standard, whose
boolean is
> very much like Guido's conception, and end with "yup, same thing in
Python".

This is helpful information.  Since switching to Python, I haven't
tracked the new standard.

> Or just point them at the PEP.  The idea that the same people are
*not*
> going to complain about True+1 if the type is called "binary" (or
anything
> else) instead isn't credible to me.  They'll insist that True+1 is
evil just
> because part of it is spelled "True".  If the new tval type had
singleton
> constants Freeble and Goroblof, people would still complain about
> Goroblof+1, but not just because of the addition <wink> ...
Perhaps you are more realistically pessimistic than me and therefore
more relaxed about what can and cannot be done ;<).

>I expect they're triggered more by True and False than by "bool". ...

At this point, I will let those who are so triggered speak for
themselves.

Terry J. Reedy






More information about the Python-list mailing list