This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: sorted() signature is not accurate in the documentation
Type: resource usage Stage: resolved
Components: Documentation Versions: Python 3.10, Python 3.9, Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: later
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, rhettinger, tomer.kalish91
Priority: normal Keywords:

Created on 2021-04-03 12:33 by tomer.kalish91, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg390122 - (view) Author: Tomer Kalish (tomer.kalish91) Date: 2021-04-03 12:33
According to the docs, the sorted function's signature is:
sorted(iterable, *, key=None, reverse=False)
But when printing its help interactively, the signature is:
sorted(iterable, /, *, key=None, reverse=False)
The latter seems to be the correct one, as calling sorted(iterable=arr) will raise a TypeError.

The signature in the docs should be fixed.
msg390126 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2021-04-03 15:56
There is moratorium on the / notation in the main docs.   If that moratorium is lifted, we sweep through the docs and apply it.
History
Date User Action Args
2022-04-11 14:59:43adminsetgithub: 87879
2021-04-03 15:56:39rhettingersetstatus: open -> closed

nosy: + rhettinger
messages: + msg390126

resolution: later
stage: resolved
2021-04-03 12:33:39tomer.kalish91create