bool behavior in Python 3000?

Bjoern Schliessmann usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Tue Jul 10 17:42:01 EDT 2007


Alan G Isaac wrote:

> My preference would be for the arithmetic operations *,+,-
> to be given the standard interpretation for a two element
> boolean algebra:
> http://en.wikipedia.org/wiki/Two-element_Boolean_algebra

>>> [bool(True+True), bool(True+False)]
[True, True]

Works for me, or did I misunderstand you?

If you don't want explicitly to write bool, you could define your
own True and False classes.

Regards,


Björn

-- 
BOFH excuse #184:

loop found in loop in redundant loopback




More information about the Python-list mailing list