Merged revisions 83872 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83872 | benjamin.peterson | 2010-08-08 21:13:10 -0500 (Sun, 08 Aug 2010) | 1 line

  use 3 space indents
........
This commit is contained in:
Benjamin Peterson 2010-08-09 02:17:24 +00:00
parent a03ff6d3cd
commit d74ca12fdd
1 changed files with 13 additions and 14 deletions

View File

@ -22,16 +22,15 @@ The :mod:`functools` module defines the following functions:
Transform an old-style comparison function to a key-function. Used with
tools that accept key functions (such as :func:`sorted`, :func:`min`,
:func:`max`, :func:`heapq.nlargest`, :func:`heapq.nsmallest`,
:func:`itertools.groupby`).
This function is primarily used as a transition tool for programs
being converted to Py3.x where comparison functions are no longer
supported.
:func:`itertools.groupby`). This function is primarily used as a transition
tool for programs being converted to Py3.x where comparison functions are no
longer supported.
A compare function is any callable that accept two arguments, compares
them, and returns a negative number for less-than, zero for equality,
or a positive number for greater-than. A key function is a callable
that accepts one argument and returns another value that indicates
the position in the desired collation sequence.
A compare function is any callable that accept two arguments, compares them,
and returns a negative number for less-than, zero for equality, or a positive
number for greater-than. A key function is a callable that accepts one
argument and returns another value that indicates the position in the desired
collation sequence.
Example::