[Python-3000] PEP 3132: Extended Iterable Unpacking
Greg Ewing
greg.ewing at canterbury.ac.nz
Sat May 5 03:23:39 CEST 2007
Simon Percivall wrote:
> This was more in the way of returning the type that was given:
> if you start with a list you end up with a list in "b", if you
> start with an iterator you end up with an iterator.
I don't think that returning the type given is a goal
that should be attempted, because it can only ever work
for a fixed set of known types. Given an arbitrary
sequence type, there is no way of knowing how to
create a new instance of it with specified contents.
--
Greg
More information about the Python-3000
mailing list