Erik Welch added the comment:

Interesting observation, Martin.

Upon further consideration, the call signature for sorted really is quite odd.  
It doesn't behave like any other builtin function.  Currently, "iterable" is 
positional-only, and "key=" and "reverse=" are keyword only.  I would only 
expect such behavior for functions with variadic *args.

I uploaded a new patch so that the call signature matches the original 
__text_signature__.  This means "iterable" may be given as a keyword argument, 
and "key" and "reverse" may be given as positional arguments.

I added tests for the new behavior, and all tests pass for me.

----------
Added file: http://bugs.python.org/file42441/sorted_2.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26729>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to