Death to tuples!

Fredrik Lundh fredrik at
Tue Nov 29 16:21:37 CET 2005

sluggoster at wrote:

> Having a general frozen() system makes a lot of sense.  People use
> tuples for two different things: as a lightweight record type (e.g.,
> (x, y) coordinate pairs), and as an immutable list.  The latter is not
> officially sanctioned but is widely believed to be the purpose for
> tuples.  And the value of an immutable list is obvious: you can use it
> as a constant or pass it to a function and know it won't be abused.  So
> why not an immutable dictionary too?  There are many times I would have
> preferred this if it were available.  frozen() is appealing because it
> provides a general solution for all container types.


More information about the Python-list mailing list