Death to tuples!
Paul Rubin
http
Mon Nov 28 01:32:46 EST 2005
Mike Meyer <mwm at mired.org> writes:
> The new intended use is as an immutable sequence type, not a
> "lightweight C struct". The new name to denote this new use -
> following in the footsteps of the set type - is "frozenlist". The
> changes to the implementation would be adding any non-mutating methods
> of list to tuple, which appears to mean "index" and "count".
I like this. I also note that tuples predated classes. The
appropriate way to do a C struct these days is often as a class
instance with __slots__.
More information about the Python-list
mailing list