(Nov-29-2016, 11:04 PM)nilamo Wrote: It looks like with python 3.0, a PEP3102 added keyword-only support (although this doesn't throw errors):That's not the correct syntax, your code allows an arbitrary number of positional arguments.
>>> def spam(eggs, *whocares, fish="fried"): print(fish) ...
You want this instead:
def spam(eggs,*,fish="fried"):
(Nov-29-2016, 11:04 PM)nilamo Wrote: But then again, the docs for 3.0's sorted do indicate that they're keyword only:Looks like that is indeed the case in python 3, and the docs clearly state it.
Considering the docs for min and max, I'd say the function signature of sorted in the docs should be updated.