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

Martin v. Loewis martin@v.loewis.de
11 Mar 2002 06:12:06 +0100


Greg Ewing <greg@cosc.canterbury.ac.nz> writes:

> Skip Montanaro <skip@pobox.com>:
> 
> > Guido's proposal is for bool to be a
> > subclass of int.  Consequently, 28 + True should yield 29
> 
> But True - 1 won't equal False. Should it?

Despite that Guido said "no" here, I think the answer is "yes", and
the first sentence is wrong: True - 1 == False. True - 1 won't be
identical with False, but it will be equal to it.

Regards,
Martin