[Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.175,1.176
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Fri Dec 3 09:31:08 CET 2004
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14724/Doc/lib
Modified Files:
libfuncs.tex
Log Message:
SF patch #1077353: add key= argument to min and max
(First draft of patch contributed by Steven Bethard.)
Index: libfuncs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -d -r1.175 -r1.176
--- libfuncs.tex 30 Sep 2004 00:59:08 -0000 1.175
+++ libfuncs.tex 3 Dec 2004 08:30:35 -0000 1.176
@@ -642,16 +642,28 @@
of sequence; the result is always a list.
\end{funcdesc}
-\begin{funcdesc}{max}{s\optional{, args...}}
+\begin{funcdesc}{max}{s\optional{, args...}\optional{key}}
With a single argument \var{s}, return the largest item of a
non-empty sequence (such as a string, tuple or list). With more
than one argument, return the largest of the arguments.
+
+ The optional \var{key} argument specifies a one argument ordering
+ function like that used for \method{list.sort()}. The \var{key}
+ argument, if supplied, must be in keyword form (for example,
+ \samp{max(a,b,c,key=func)}).
+ \versionchanged[Added support for the optional \var{key} argument]{2.5}
\end{funcdesc}
\begin{funcdesc}{min}{s\optional{, args...}}
With a single argument \var{s}, return the smallest item of a
non-empty sequence (such as a string, tuple or list). With more
than one argument, return the smallest of the arguments.
+
+ The optional \var{key} argument specifies a one argument ordering
+ function like that used for \method{list.sort()}. The \var{key}
+ argument, if supplied, must be in keyword form (for example,
+ \samp{min(a,b,c,key=func)}).
+ \versionchanged[Added support for the optional \var{key} argument]{2.5}
\end{funcdesc}
\begin{funcdesc}{object}{}
More information about the Python-checkins
mailing list