Death to tuples!

Fredrik Lundh fredrik at
Tue Nov 29 10:36:00 CET 2005

Paddy wrote:

> I would consider
>  t =  ([1,2], [3,4])
> to be assigning a tuple with two list elements to t.
> The inner lists will be mutable but I did not know you could change the
> outer tuple and still have the same tuple object.

you can't.

but since hash(tuple) is defined in terms of map(hash, t), the resulting
tuple is not hashable.

also see:


More information about the Python-list mailing list