A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-December/050179.html below:

[Python-Dev] adding key argument to min and max

[Python-Dev] adding key argument to min and max [Python-Dev] adding key argument to min and maxGuido 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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4