andmap and ormap

Georg Brandl g.brandl-nospam at gmx.net
Tue Mar 14 08:16:51 EST 2006


Peter Otten wrote:

> Python 2.5 will feature similar functions any() and all() which seem to have
> a fixed predicate == bool, though.

You cannot write

all(predicate, list)

but

all(predicate(x) for x in list)

Georg



More information about the Python-list mailing list