[Python-Dev] For review: PEP 285: Adding a bool type
Aahz Maruch
aahz@rahul.net
Fri, 8 Mar 2002 07:59:21 -0800 (PST)
Guido van Rossum wrote:
>
> PEP: 285
> Title: Adding a bool type
>
> This PEP proposes the introduction of a new built-in type, bool,
> with two constants, False and True. The bool type would be a
> straightforward subtype (in C) of the int type, and the values
> False and True would behave like 0 and 1 in most respects (e.g.
> False==0 and True==1 would be true) except repr() and str(). All
> built-in operations that conceptually return a Boolean result will
> be changed to return False or True instead of 0 or 1; for example,
> comparisons and the "not" operator.
+1000 ;-)
One question: do True/False behave like None, particularly WRT "is"?
--
--- Aahz (@pobox.com)
Hugs and backrubs -- I break Rule 6 <*> http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het Pythonista
We must not let the evil of a few trample the freedoms of the many.