[Python-3000] PEP 3132: Extended Iterable Unpacking

Greg Ewing greg.ewing at canterbury.ac.nz
Fri May 4 06:26:24 CEST 2007


Steven Bethard wrote:

> This brings up the question of why the patch produces lists, not
> tuples. What's the reasoning behind that?

When dealing with an iterator, you don't know the
length in advance, so the only way to get a tuple
would be to produce a list first and then create
a tuple from it.

--
Greg


More information about the Python-3000 mailing list