[Python-Dev] Re: PEP 285: Adding a bool type (original) (raw)

Samuele Pedroni pedroni@inf.ethz.ch
Tue, 2 Apr 2002 21:12:08 +0200


From: M.-A. Lemburg <mal@lemburg.com>

As a conclusion, I think it would be better to make bool() a new type which does not inherit from integers, but which does know how deal with other types which are commonly used together with booleans such as integers. However, the type should implement boolean algebra and not try to mimic integer arithemtic, i.e. True - True raises an exception.

"but which does know how deal with other types which are commonly used together with booleans such as integers" ??

with deal you mean throwing exceptions?

regards.