PEP 285: Adding a bool type

Martin v. Loewis martin at v.loewis.de
Sat Mar 30 16:58:45 EST 2002


"Boris Qaré" <borcis at geneva-link.ch> writes:

> How's that ? What's the point of making bool a type if we
> can't subclass methods for __and__, __or__, __or_not__,
> etc ? we could still save the shortcut semantics ...

Those are redefined in bool (although the third one is name __xor__);
but they refer to the bitwise operators, &, |, ^.

The shortcut construct (and, or) won't change under this PEP.

Regards,
Martin



More information about the Python-list mailing list