PEP 285: Adding a bool type
Christian Tanzer
tanzer at swing.co.at
Wed Apr 3 01:00:54 EST 2002
bokr at oz.net (Bengt Richter) wrote:
> >If you called it "binary" instead of "bool" would it help you think of
> >it as being more like a number?
> >
> No. Because numbers are ordered, and bools are not. bools are selected
> elements from an unordered set of two possibilities.
FWIW, Ada and Pascal define booleans as ordered with False < True. In
both languages, you have to use `ord(x)` to get the integer equivalent
of a boolean value.
Both languages' booleans suck in comparison to Python's concept of
truth.
--
Christian Tanzer tanzer at swing.co.at
Glasauergasse 32 Tel: +43 1 876 62 36
A-1130 Vienna, Austria Fax: +43 1 877 66 92
More information about the Python-list
mailing list