Skip to content

[3.6][trivial] Doc that 'sorted' args are keyword-only, fix 'reverse' default #2709

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,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*.

Expand Down
2 changes: 1 addition & 1 deletion Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,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
Expand Down