]> granicus.if.org Git - python/commitdiff
use 3 space indents
authorBenjamin Peterson <benjamin@python.org>
Mon, 9 Aug 2010 02:13:10 +0000 (02:13 +0000)
committerBenjamin Peterson <benjamin@python.org>
Mon, 9 Aug 2010 02:13:10 +0000 (02:13 +0000)
Doc/library/functools.rst

index 39b0e7b9b2cf924adf1895203a654e81effdbcea..77e92f819e09ee37d96535bee3e0b8118f448776 100644 (file)
@@ -17,23 +17,22 @@ The :mod:`functools` module defines the following functions:
 
 ..  function:: cmp_to_key(func)
 
-    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 from Py2.x which supported the use of comparison
-    functions.
-
-    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::
-
-        sorted(iterable, key=cmp_to_key(locale.strcoll))  # locale-aware sort order
+   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 from Py2.x which supported the use of
+   comparison functions.
+
+   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::
+
+       sorted(iterable, key=cmp_to_key(locale.strcoll))  # locale-aware sort order
 
    .. versionadded:: 3.2