diff options
author | Ćukasz Rogalski <rogalski.91@gmail.com> | 2017-07-14 21:57:19 +0200 |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2017-07-14 15:57:19 -0400 |
commit | ea9cbe0a5cc4d35643939c6ddee7fc96dbfff211 (patch) | |
tree | 6f9c9bfd90f692ecb744351e2282950b9325cb84 | |
parent | 1aafd9c8bd10b44f62d05428e0e99ed50b5f5d39 (diff) | |
download | cpython-git-ea9cbe0a5cc4d35643939c6ddee7fc96dbfff211.tar.gz |
Doc that 'sorted' args are keyword-only, fix 'reverse' default (#2709)
backport
-rw-r--r-- | Doc/library/functions.rst | 2 | ||||
-rw-r--r-- | Doc/library/stdtypes.rst | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 6621f4aabf..916e3528d7 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1319,7 +1319,7 @@ are always available. They are listed here in alphabetical order. :func:`itertools.islice` for an alternate version that returns an iterator. -.. function:: sorted(iterable[, key][, reverse]) +.. function:: sorted(iterable, *, key=None, reverse=False) Return a new sorted list from the items in *iterable*. diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 5ab8177490..e929f0b687 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1161,7 +1161,7 @@ application). :ref:`mutable <typesseq-mutable>` sequence operations. Lists also provide the following additional method: - .. method:: list.sort(*, key=None, reverse=None) + .. method:: list.sort(*, key=None, reverse=False) This method sorts the list in place, using only ``<`` comparisons between items. Exceptions are not suppressed - if any comparison operations |