<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 27, 2017 at 1:32 PM, Chris Angelico <span dir="ltr"><<a href="mailto:rosuav@gmail.com" target="_blank">rosuav@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Nov 28, 2017 at 8:24 AM, Guido van Rossum <<a href="mailto:guido@python.org">guido@python.org</a>> wrote:<br>
> On Mon, Nov 27, 2017 at 1:18 PM, Greg Ewing <<a href="mailto:greg.ewing@canterbury.ac.nz">greg.ewing@canterbury.ac.nz</a>><br>
> wrote:<br>
>><br>
>> Chris Angelico wrote:<br>
>>><br>
>>> The problem is that it depends on internal whitespace to<br>
>>> distinguish it from augmented assignment;<br>
>><br>
>><br>
>> Ah, didn't spot that. I guess the ellipsis is the next best<br>
>> thing then.<br>
>><br>
>> An alternative would be to require parens:<br>
>><br>
>> (x, y, *) = z<br>
><br>
><br>
> But that would have the same issue.<br>
><br>
> Is this problem really important enough that it requires dedicated syntax?<br>
> Isn't the itertools-based solution good enough? (Or failing that, couldn't<br>
> we add something to itertools to make it more readable rather than going<br>
> straight to new syntax?)<br>
<br>
</span>I don't think there's much that can be done without syntax; the<br>
biggest problem IMO is that you need to tell islice how many targets<br>
it'll be assigned into. It needs some interpreter support to express<br>
"grab as many as you have targets for, leaving everything else behind"<br>
without stating how many that actually is. So the question is whether<br>
that is sufficiently useful to justify extending the syntax. There are<br>
a number of potential advantages and several competing syntax options,<br>
and this suggestion keeps coming up, so I think a PEP is warranted.<br></blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">OK, that's reasonable, and at first blush the ellipsis proposal looks okay. My PEP queue for Python 3.7 is full though, so I would like to put this off until 3.8.<br clear="all"></div><div class="gmail_extra"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div></div>