[Python-ideas] How assignment should work with generators?
Guido van Rossum
guido at python.org
Mon Nov 27 16:24:38 EST 2017
On Mon, Nov 27, 2017 at 1:18 PM, Greg Ewing <greg.ewing at canterbury.ac.nz>
wrote:
> Chris Angelico wrote:
>
>> The problem is that it depends on internal whitespace to
>> distinguish it from augmented assignment;
>>
>
> Ah, didn't spot that. I guess the ellipsis is the next best
> thing then.
>
> An alternative would be to require parens:
>
> (x, y, *) = z
>
But that would have the same issue.
Is this problem really important enough that it requires dedicated syntax?
Isn't the itertools-based solution good enough? (Or failing that, couldn't
we add something to itertools to make it more readable rather than going
straight to new syntax?)
--
--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20171127/f1fd6073/attachment-0001.html>
More information about the Python-ideas
mailing list