Doc that 'sorted' args are keyword-only, fix 'reverse' default (#2706)

This commit is contained in:
Łukasz Rogalski 2017-07-14 21:23:39 +02:00 committed by R. David Murray
parent 0d0a32fb91
commit be37beb05f
2 changed files with 2 additions and 2 deletions

View File

@ -1361,7 +1361,7 @@ are always available. They are listed here in alphabetical order.
:func:`itertools.islice` for an alternate version that returns an iterator. :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*. Return a new sorted list from the items in *iterable*.

View File

@ -1161,7 +1161,7 @@ application).
:ref:`mutable <typesseq-mutable>` sequence operations. Lists also provide the :ref:`mutable <typesseq-mutable>` sequence operations. Lists also provide the
following additional method: 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 This method sorts the list in place, using only ``<`` comparisons
between items. Exceptions are not suppressed - if any comparison operations between items. Exceptions are not suppressed - if any comparison operations