Another proposed proposal: operator.bool_and / bool_or
Klaas
mike.klaas at gmail.com
Thu Mar 30 23:15:00 EST 2006
> def any(seq): return reduce(bool_or, seq, False)
> def all(seq): return reduce(bool_and, seq, True)
Any other use cases? These will be built-in in 2.5
-Mike
More information about the Python-list
mailing list