[Nick] > does anyone else think a 'key' parameter on any() and all() > would be useful?
Not really. The key= function is useful whenever you need to keep the original value around for some reason (i.e. sorting it or getting the min/max value). But with any() and all() you don't keep anything. Also, if you take examples of any() and all() and try them with the key= syntax, you'll find that they become less readable. Besides, for the "gurus who are in the know", the min() and max() functions can often be substituted directly for any() and all() and then you get the key= syntax for free ;-) any(x%2==0 for x in s) max(x%2==0 for x in s) Raymond _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
