Erik Welch added the comment:
That's a fair and valid point, Raymond. "sorted_2.patch" was submitted for
consideration. Either __text_signature__ is wrong, or the call argument
handling is wrong. One should be fixed.
Having a flexible call signature as if sorted were a user-defined function,
such as "def sorted(iterable, key=None, reverse=False):", does allow for
programmatic use of the introspected signature. Here, using "iterable=" as a
keyword can be convenient.
"sorted_1.diff" is wrong. To match the existing call signature,
__text_signature__ should be:
sorted($module, iterable, /, *, key=None, reverse=False)
I don't know any other builtin with a signature like this. Such a signature
may be a point of confusion for people learning Python ("what are those funny
symbols?!"), who often encounter sorted early on.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue26729>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com