[Python-Dev] adding key argument to min and max
Guido van Rossum
gvanrossum at gmail.com
Thu Dec 2 02:58:48 CET 2004
> > I don't want to put words into your mouth, so is this a vote against a
> > key= argument for min and max?
>
> Right. I don't think there is any need.
Hm, min and max are probably needed 2-3 orders of magnitude more
frequently than nsmallest/nlargest. So I think it's reasonable to add
the key= argument to min and max as well. (We didn't leave it out of
sorted() because you can already do it with list.sort().)
> def test_largest(self):
shouldn't that be test_nlargest?
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list