[Python-Dev] For review: PEP 285: Adding a bool type
Guido van Rossum
guido@python.org
Sun, 10 Mar 2002 09:43:11 -0500
> (This is a serious question) How do you imagine bool
> presented to (non-programmer) newbies.
>
> Not presented. Presented disjunct from int at the beginning.
> Using the notion of subtyping/subclassing.
> Operationally:
> True == 1
> False == 0
> etc .
Good point. The tutorial needs to be updated. I propose not to make
a big deal from it, but to mention that (a) you get bools from most
propositions, (b) False==0, True==1, (c) most other objects are also
usable as Boolean values, e.g. "" is false, "x" is true. Needs to
distinguish clearly between False and True (the specific bool values)
and more general falsehood/truth.
--Guido van Rossum (home page: http://www.python.org/~guido/)