<div dir="ltr">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).<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 20, 2015 at 8:51 AM, Neil Girdhar <span dir="ltr"><<a href="mailto:mistersheik@gmail.com" target="_blank">mistersheik@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br><br></div><div>Okay, so: <span style="font-size:13px">positional arguments neither follow keyword arguments nor keyword argument unpackings; </span>i<span style="font-size:13px">terable argument unpackings never follow keyword argument unpackings.</span></div><div><div> </div></div><div> </div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Jan 20, 2015 at 11:47 AM, Joshua Landau <span dir="ltr"><<a href="mailto:joshua@landau.ws" target="_blank">joshua@landau.ws</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><span>On 20 January 2015 at 16:38, Guido van Rossum <<a href="mailto:guido@python.org" target="_blank">guido@python.org</a>> wrote:<br>
> The PEP hasn't been accepted yet AFAIK... I'm generally okay with allowing<br>
> multiple *x things (except in an *unpack* position of course) but I still<br>
> don't think we should be mixing positional and keyword args. So, no f(a,<br>
> b=2, c), nor f(a, b=2, *c).<br>
><br>
<br>
</span>f(a, b=2, *c) is currently legal as both a call and as a definition:<br>
<br>
a, *c = 1, 2, 3<br>
<br>
def f(*args, **kwargs):<br>
print(args, kwargs)<br>
<br>
f(a, b=2, *c)<br>
#>>> (1, 2, 3) {'b': 2}<br>
<br>
def f(a, b=2, *c):<br>
print(a, b, c)<br>
<br>
f(1, 2, 3)<br>
#>>> 1 2 (3,)<br>
<br>
So I imagine that's staying (or, at least, this PEP isn't removing<br>
it). I don't think anyone is (yet) arguing for f(a, b=2, c).<br>
</div></div><div><div><div><div class="h5">_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank">http://python.org/psf/codeofconduct/</a><br>
<br></div></div><span class="">
--<br>
<br>
---<br>
You received this message because you are subscribed to a topic in the Google Groups "python-ideas" group.<br>
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/python-ideas/J99EFY1D1nI/unsubscribe" target="_blank">https://groups.google.com/d/topic/python-ideas/J99EFY1D1nI/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href="mailto:python-ideas%2Bunsubscribe@googlegroups.com" target="_blank">python-ideas+unsubscribe@googlegroups.com</a>.<br>
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank">https://groups.google.com/d/optout</a>.<br>
</span></div></div></blockquote></div><br></div>
<br>_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank">http://python.org/psf/codeofconduct/</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido">python.org/~guido</a>)</div>
</div>