[Python-ideas] PEP for issue2292, "Missing *-unpacking generalizations"

Jan Kaliszewski zuo at chopin.edu.pl
Sat Jul 6 22:38:55 CEST 2013


While I like all the literal/comprehension/etc.-related proposals, 
those related to function definitions seem to me to be dubious.

I am not convinced by the argument of unification with the assignment 
LHS syntax.

Assignment LHS and function parameter processing are inherently 
different in Python anyway:

* the former does not (and rather, even imaginarily, cannot) include 
**keywords unpacking and any notion of parameter names,
* the latter sets *args as a tuple, not as a list.

Making possible to define some positional arguments after *args does 
not seem to be a big win, and would destroy nice simplicity of the way 
you specify keyword-only arguments.

***

Forbidding keyword arguments before *args in function calls does not 
seem so bad, but still it is a serious backwards incompatibility... And 
why would we actually want to forbid it?

Regards.
*j



More information about the Python-ideas mailing list