Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libstdtypes.tex @ 20173:f100793ca9af legacy-trunk
The list.sort() docs require a function that returns -1, 0 or +1. That's
never been true, and in particular implies cmp() can't be used(!). Get
closer to the truth.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Sat, 29 Sep 2001 01:08:19 +0000 |
| parents | 7b8c11739714 |
| children | 376ee174ecd0 |
line wrap: on
line diff
--- a/Doc/lib/libstdtypes.tex Sat Sep 29 01:05:03 2001 +0000 +++ b/Doc/lib/libstdtypes.tex Sat Sep 29 01:08:19 2001 +0000 @@ -885,7 +885,7 @@ \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
