[Python-checkins] python/dist/src/Doc/lib liboperator.tex, 1.30,
1.31
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Wed Dec 17 15:50:48 EST 2003
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv10880
Modified Files:
liboperator.tex
Log Message:
Guido grants a Christmas wish:
sorted() becomes a regular function instead of a classmethod.
Index: liboperator.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/liboperator.tex,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** liboperator.tex 1 Dec 2003 13:18:39 -0000 1.30
--- liboperator.tex 17 Dec 2003 20:50:46 -0000 1.31
***************
*** 303,307 ****
The \module{operator} module also defines tools for generalized attribute
and item lookups. These are useful for making fast field extractors
! as arguments for \function{map()}, \method{list.sort()},
\method{itertools.groupby()}, or other functions that expect a
function argument.
--- 303,307 ----
The \module{operator} module also defines tools for generalized attribute
and item lookups. These are useful for making fast field extractors
! as arguments for \function{map()}, \function{sorted()},
\method{itertools.groupby()}, or other functions that expect a
function argument.
***************
*** 329,333 ****
>>> map(getcount, inventory)
[3, 2, 5, 1]
! >>> list.sorted(inventory, key=getcount)
[('orange', 1), ('banana', 2), ('apple', 3), ('pear', 5)]
\end{verbatim}
--- 329,333 ----
>>> map(getcount, inventory)
[3, 2, 5, 1]
! >>> sorted(inventory, key=getcount)
[('orange', 1), ('banana', 2), ('apple', 3), ('pear', 5)]
\end{verbatim}
More information about the Python-checkins
mailing list