[Python-ideas] What's going on with PEP 448 - Additional Unpacking Generalizations ?
Joshua Landau
joshua at landau.ws
Tue Jan 20 15:18:51 CET 2015
On 20 January 2015 at 11:02, Neil Girdhar <mistersheik at gmail.com> wrote:
> I've been working on the patch for PEP 448. Are the restrictions on the
> order of arguments in a function call partially or fully lifted?
I believe we settled on
function(
argument or *args, argument or *args, ...,
kwargument or *args, kwargument or *args, ...,
kwargument or **kwargs, kwargument or **kwargs, ...
)
as the most likely candidate.
Guido said
> Regarding the decision about the allowable syntax for argument lists,
> I prefer to keep the existing restriction
See https://mail.python.org/pipermail/python-ideas/2013-July/021872.html
for the discussion.
> Currently, we can do:
> def f(a, b, c, d):
> pass
>
> f(1, d=4, *[1,2], 2, **{})
>
> After PEP 448 can we do:
>
> f(1, d=4, *[2], c=3, **{})
>
> ?
These should be OK, if I've understood the sentiment.
More information about the Python-ideas
mailing list