Robert Kern wrote:
Well, that's not entirely true. They need to be not mutated while they are in the dictionary, certainly. At least not in ways that affect equality testing. In this case, one would also have to override list.__eq__ to also compare by identity, too. Then you could mutate the lists to your heart's content and the dictionary wouldn't care.
at which point you'd start wondering if it wouldn't be more efficient to wrap the list in a light-weight class, instead of using subclassing.
</F> -- http://mail.python.org/mailman/listinfo/python-list