In Python there are so many ways to do things...
This looks like another one, I haven't tested it:

not False in imap(pred, iterable)

As usual tests are required to measure the faster one.
I agree with Roose, there are are some "primitive" operations (like
this, and flatten, partition, mass removal of keys from a dictionary,
and few others) that can be added to the language (but I'm still not
capabable of doing it myself, and Python is free, so it's not right to
ask people to work for free for us).

Bear hugs,
Bearophile

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to