[Patches] [ python-Patches-1077353 ] add key= argument to min and max

SourceForge.net noreply at sourceforge.net
Thu Dec 2 07:59:28 CET 2004


Patches item #1077353, was opened at 2004-12-01 23:57
Message generated for change (Settings changed) made by bediviere
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1077353&group_id=5470

Category: Core (C code)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Steven Bethard (bediviere)
>Assigned to: Raymond Hettinger (rhettinger)
Summary: add key= argument to min and max

Initial Comment:
Adds a key= keyword argument to the builtin functions
min and max.  This argument works just like key for
list.sort and sorted, so that the values compared by
the min/max routine are produced by applying the key=
function to the item under consideration.  Note that
key= is *only* a keyword argument and cannot be
accessed as a positional argument so as not to
interfere with the max(a, b, c, ...) form of the functions.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1077353&group_id=5470


More information about the Patches mailing list