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

Guido van Rossum guido at python.org
Sun Jul 14 04:04:17 CEST 2013


On Fri, Jul 12, 2013 at 5:25 PM, Joshua Landau
<joshua.landau.ws at gmail.com> wrote:
> A blessing from the Gods has resulted in
> http://www.python.org/dev/peps/pep-0448/! See what you think; it's not too
> changed from before but it's mighty pretty now.
>
> Still up for discussion are the specifics of function call syntax, the full
> details of which should already be in the PEP. If you come up with a better
> suggestion or want argue for one of the choices, go ahead.

I like it. I note that we now end up with new ways for concatenating
sequences (e.g. [*a, *b]) and also for merging dicts (e.g. {**a,
**b}). I think it would be good to prepare an implementation in time
for inclusion in Python 3.4a1 to avoid the same issue with this we had
before -- I could imagine that there might be some implementation
problems and I don't want to accept an unimplementable PEP. Also it
would be good to know that code not using the new syntax won't run any
slower (especially for function calls this is very important).

Regarding the decision about the allowable syntax for argument lists,
I prefer to keep the existing restriction (making *args after a
keyword argument basically an exception) since, as you point out,
placing regular positional arguments after regular keyword arguments
looks plain silly.

-- 
--Guido van Rossum (python.org/~guido)


More information about the Python-ideas mailing list