Booleans (was: Conditional operator in Python?)
Ben Wolfson
wolfson at uchicago.edu
Fri Apr 6 12:58:00 EDT 2001
In article <3ACDF088.88E7406A at alcyone.com>, "Erik Max Francis"
<max at alcyone.com> wrote:
> This is true. I would be mollified if there were a builtin operator
> that tests truth in the same way that if ...: does. It would be named
> something like bool or boolean and would return a 0 or 1 and nothing
> else:
There is a function "truth" in the operator module that does exactly
that; you could put a 'from operator import truth' in site.py, I suppose.
--
Barnabas T. Rumjuggler
The women come and go,
Speaking of the Regis Philbin Show
-- Joe Frank
More information about the Python-list
mailing list