The list.sort() method accepts a "key=" parameter to let you specify a function that will change the way it sorts. In Python 2.5, min() and max() now accept a "key=" parameter that changes how the functions decide min or max.
Should any() and all() take a key= argument? Example: >>> lst = [2, 4, 42] >>> any(lst, key=lambda x: x == 42) True >>> all(lst, key=lambda x: x % 2 == 0) True The above could be done with generator expressions: >>> any(x == 42 for x in lst) True >>> all(x % 2 == 0 for x in lst) True I kind of like the key= option. The need isn't as strong as with .sort(), min(), and max(), but consistency can be a good thing. I'd personally like to see key= anywhere it makes sense. -- Steve R. Hastings "Vita est" [EMAIL PROTECTED] http://www.blarg.net/~steveha -- http://mail.python.org/mailman/listinfo/python-list