]> granicus.if.org Git - python/commitdiff
The list.sort() docs require a function that returns -1, 0 or +1. That's
authorTim Peters <tim.peters@gmail.com>
Sat, 29 Sep 2001 01:08:19 +0000 (01:08 +0000)
committerTim Peters <tim.peters@gmail.com>
Sat, 29 Sep 2001 01:08:19 +0000 (01:08 +0000)
never been true, and in particular implies cmp() can't be used(!).  Get
closer to the truth.

Doc/lib/libstdtypes.tex

index 916a1cfa4996aa01047055bbe49ba88d1251a829..b06cd5eb136bd0b1f10f1d6647bd7f9e036680e8 100644 (file)
@@ -885,7 +885,7 @@ Notes:
 
 \item[(6)] The \method{sort()} method takes an optional argument
   specifying a comparison function of two arguments (list items) which
-  should return \code{-1}, \code{0} or \code{1} depending on whether
+  should return a negative, zero or positive number depending on whether
   the first argument is considered smaller than, equal to, or larger
   than the second argument.  Note that this slows the sorting process
   down considerably; e.g. to sort a list in reverse order it is much