[issue43713] sorted() signature is not accurate in the documentation
New submission from Tomer Kalish <tomer.kalish91@gmail.com>: 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. ---------- assignee: docs@python components: Documentation messages: 390122 nosy: docs@python, tomer.kalish91 priority: normal severity: normal status: open title: sorted() signature is not accurate in the documentation type: resource usage versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue43713> _______________________________________
Raymond Hettinger <raymond.hettinger@gmail.com> added the comment: There is moratorium on the / notation in the main docs. If that moratorium is lifted, we sweep through the docs and apply it. ---------- nosy: +rhettinger resolution: -> later stage: -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue43713> _______________________________________
participants (2)
-
Raymond Hettinger
-
Tomer Kalish