[Python-Dev] For review: PEP 285: Adding a bool type
Samuele Pedroni
pedroni@inf.ethz.ch
Sun, 10 Mar 2002 13:31:31 +0100
[GvR]
> I've spent an evening hacking. There's now an experimental
> implementation of the PEP on SourceForge:
>
>
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=528022&group_id=547
0
>
> It including a unittest file, test_bool.py, which checks the promises
> made in the PEP, and a little bit of documentation. (Unfortunately,
> because much about new-style classes in 2.2 is not yet documented,
> documenting bool as a subclass of int sticks out like a sore
> thumb. :-)
>
(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 .
Thanks. Samuele Pedroni.