[Python-ideas] Generator unpacking
Greg Ewing
greg.ewing at canterbury.ac.nz
Sun Feb 14 15:44:55 EST 2016
Georg Brandl wrote:
> a, b, *... = value
>
> Ellipsis could then be a general "throw-away" lvalue. This would make it
> possible to say
>
> a, ..., b, ... = some_function()
>
> i.e. skip exactly one item in unpacking.
I thought about that too, but it seemed like it would be
too confusing -- the above *looks* like it should be
skipping an arbitrary number of items.
I think this interpretation would be even more inconsistent
with existing uses of ... in both Python and English.
--
Greg
More information about the Python-ideas
mailing list