[Python-ideas] Generator unpacking

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Feb 13 02:59:55 EST 2016


Andrew Barnert via Python-ideas wrote:
> I think what you're _really_ suggesting here is that there should be a way to
> unpack iterators lazily,

Seems to me you should be able to write

   a, b, * = some_iter

as a way of saying "I don't care about the rest of the values".

-- 
Greg


More information about the Python-ideas mailing list