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

John Roth johnroth at ameritech.net
Wed Apr 3 06:45:39 EST 2002


"Paul Rubin" <phr-n2002a at nightsong.com> wrote in message
news:7xpu1h4h1m.fsf at ruckus.brouhaha.com...
> "John Roth" <johnroth at ameritech.net> writes:
> > I absolutely agree. For me, the entire point is providing
> > a **standard** way of expressing **in the code** the
> > notion that a particular variable only takes two values:
> > True and False. This is such a common case that it deserves
> > to be promoted to be a part of the language.
>
> Why not ask for enumeration types then?

Enumeration types should be part of the set PEP
(I forget the number.) They go together well, in
that an enumeration is simply a set, and some languages
that support both concepts unify them.

However, supporting True and False as an
enumeration type is the same kind of hack as
using 0 and 1.

John Roth





More information about the Python-list mailing list