[Python-ideas] How assignment should work with generators?
k7hoven at gmail.com
Mon Nov 27 10:23:31 EST 2017
On Mon, Nov 27, 2017 at 4:50 PM, Kirill Balunov <kirillbalunov at gmail.com>
> I really do not like to use "starred" targets in any way:
> x, y, * = iterable
This one won't work, because it looks like in-place multiplication
(__imul__) which clashes with the above for a single name as assignment
x *= 2 # "x = x * 2"
> x, y, *...
> Because any "starred" target implies consuming or collecting, and
> contradicts with the proposed behavior.
Consuming does not contradict with your proposal, but maybe you mean *fully
consuming*. I think you are proposing partial or incremental consumption of
+ Koos Zevenhoven + http://twitter.com/k7hoven +
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas