Message263230
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. |
|
Date |
User |
Action |
Args |
2016-04-12 06:16:37 | eriknw | set | recipients:
+ eriknw, rhettinger, ncoghlan, martin.panter |
2016-04-12 06:16:37 | eriknw | set | messageid: <1460441797.72.0.194442593456.issue26729@psf.upfronthosting.co.za> |
2016-04-12 06:16:37 | eriknw | link | issue26729 messages |
2016-04-12 06:16:37 | eriknw | create | |
|