Re: Fast union/intersection of two sequences?

Donald Beaudry (don@dvcorp.com)
Tue, 24 Jan 1995 17:19:05 -0500

Guido wrote:
> As a final warning, *if* a class defines a __hash__, it has the
> responsibility to be immutable. If you violate this rule, it is
> possible to use an object as a dictionary key, and then change it,
> after which it may become impossible to find it back in the
> dictionary...

This statement is a bit too strong for me. I think it is safe to say
that your object can be mutable so long as the attributes used to
compute the hash value (the keys) do not change.

--
Donald Beaudry                                DataViews Corporation
Software Engineer                             47 Pleasant Street
don@dvcorp.com                                Northampton, MA 01060
		  "So much code, so little time..."