[Python-ideas] Generator unpacking
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Feb 15 15:11:55 EST 2016
Andrew Barnert via Python-ideas wrote:
> On Feb 15, 2016, at 00:50, Chris Angelico <rosuav at gmail.com> wrote:
>
>>>Yeah... uhh... "iter(x)" is a less cute way of asserting that it's iterable :D
>
> With the side benefit of not also asserting that it's empty, and not possibly consuming elements. :)
Er, yeah, there is that. :-)
But with the proposed syntax it could be
[...] = something
assuming the compiler doesn't decide to optimize out
the iter() in that case.
--
Greg
More information about the Python-ideas
mailing list