[Python-ideas] What's going on with PEP 448 - Additional Unpacking Generalizations ?

Guido van Rossum guido at python.org
Tue Jan 20 18:48:40 CET 2015


Thanks very much for your work! I am CC'ing python-dev to see if there are
any last calls for PEP 448. Assuming no material objection appear to the
new syntax and semantics, I can approve the PEP later this week. To get it
committed, you need one of the active committers to give you a code review
(waiting for me would mean waiting forever). Maybe Antoine, Benjamin or
Victor?

On Tue, Jan 20, 2015 at 9:39 AM, Neil Girdhar <mistersheik at gmail.com> wrote:

> I believe I have finally finished the work on the patch for PEP 448 (
> http://bugs.python.org/issue2292).  How do we get the PEP approved?  What
> else would we need to check it into Python?
>
> Best,
>
> Neil
>
> On Tue, Jan 20, 2015 at 12:03 PM, Guido van Rossum <guido at python.org>
> wrote:
>
>> OK. I don't like arg unpackings after keyword args, for the same reason
>> plain positional args aren't allowed after keyword args, but I guess I
>> didn't pay attention when it was introduced, so we're stuck with it now,
>> it's not the end of the world, and at least the definition is clear
>> (collect all positional args first, then handle keyword args).
>>
>> On Tue, Jan 20, 2015 at 8:51 AM, Neil Girdhar <mistersheik at gmail.com>
>> wrote:
>>
>>>
>>>
>>> Okay, so: positional arguments neither follow keyword arguments nor
>>> keyword argument unpackings; iterable argument unpackings never follow
>>> keyword argument unpackings.
>>>
>>>
>>>
>>> On Tue, Jan 20, 2015 at 11:47 AM, Joshua Landau <joshua at landau.ws>
>>> wrote:
>>>
>>>> On 20 January 2015 at 16:38, Guido van Rossum <guido at python.org> wrote:
>>>> > The PEP hasn't been accepted yet AFAIK...  I'm generally okay with
>>>> allowing
>>>> > multiple *x things (except in an *unpack* position of course) but I
>>>> still
>>>> > don't think we should be mixing positional and keyword args. So, no
>>>> f(a,
>>>> > b=2, c), nor f(a, b=2, *c).
>>>> >
>>>>
>>>> f(a, b=2, *c) is currently legal as both a call and as a definition:
>>>>
>>>>     a, *c = 1, 2, 3
>>>>
>>>>     def f(*args, **kwargs):
>>>>         print(args, kwargs)
>>>>
>>>>     f(a, b=2, *c)
>>>>     #>>> (1, 2, 3) {'b': 2}
>>>>
>>>>     def f(a, b=2, *c):
>>>>         print(a, b, c)
>>>>
>>>>     f(1, 2, 3)
>>>>     #>>> 1 2 (3,)
>>>>
>>>> So I imagine that's staying (or, at least, this PEP isn't removing
>>>> it). I don't think anyone is (yet) arguing for f(a, b=2, c).
>>>> _______________________________________________
>>>> Python-ideas mailing list
>>>> Python-ideas at python.org
>>>> https://mail.python.org/mailman/listinfo/python-ideas
>>>> Code of Conduct: http://python.org/psf/codeofconduct/
>>>>
>>>> --
>>>>
>>>> ---
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "python-ideas" group.
>>>> To unsubscribe from this topic, visit
>>>> https://groups.google.com/d/topic/python-ideas/J99EFY1D1nI/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> python-ideas+unsubscribe at googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>> _______________________________________________
>>> Python-ideas mailing list
>>> Python-ideas at python.org
>>> https://mail.python.org/mailman/listinfo/python-ideas
>>> Code of Conduct: http://python.org/psf/codeofconduct/
>>>
>>
>>
>>
>> --
>> --Guido van Rossum (python.org/~guido)
>>
>
>


-- 
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150120/7efd296e/attachment.html>


More information about the Python-ideas mailing list