[Python-3000] Immutable lists (was: Re: Type annotations: annotating generators)
Greg Ewing
greg.ewing at canterbury.ac.nz
Tue May 23 02:42:21 CEST 2006
Collin Winter wrote:
> In Python 2, sure, but if Python 3 introduces the idea that tuples
> should be used for fixed-length structures (since Guido has said that
> tuple[Number, Number] should be a 2-tuple of Numbers), then something
> else needs to fill the "hashable, arbitrary-length ordered container"
> niche.
The way to resolve this is to devise a notation for
arbitrary-length tuple types, not to introduce a whole
new data type and revise everyone's ideas on how a
tuple should be used. As far as I'm aware, Guido has
never said that tuples should *only* be used for
fixed-length applications.
--
Greg
More information about the Python-3000
mailing list