[issue25542] tuple unpacking on assignment should be lazy for unpacked generators

2015-11-03 Thread Martin Panter
Martin Panter added the comment: But when the starred element is not the final one, it couldn’t be lazy, so you would end up with an inconsistency. a, *rest, z = Also, it would be inconsistent with other kinds of iterables, which get turned into list objects. >>> a, *aa = (1, 2) >>> aa [2]

[issue25542] tuple unpacking on assignment should be lazy for unpacked generators

2015-11-03 Thread Mario Wenzel
New submission from Mario Wenzel: if I have an assignment a = then a is the generator. But if I do any kind of unpacking *a, = # a list of all items a, *aa = # first item in a, list of rest in as If the right-hand side is a generator expression, I would expect that a, *aa unpacks the

[issue25542] tuple unpacking on assignment should be lazy for unpacked generators

2015-11-03 Thread Mario Wenzel
Mario Wenzel added the comment: You are right. I didn't even know head, *middle, end = worked. Thanks -- resolution: -> rejected status: open -> closed ___ Python tracker