.../Python-3.0b2/Python-3.0b2/Doc/build/html/reference/datamodel.html#object.__hash__
"""If a class defines mutable objects and implements a __cmp__() or __eq__() method, it should not implement __hash__(), since the dictionary implementation requires that a key’s hash value is immutable (if the object’s hash value changes, it will be in the wrong hash bucket). """ What I had been planning to do was implement a hash code created by hashing a unique integer, say the sequential order in which the instance of the class was created. This would be unique and unchanging number, so the explanation of why __hash__ should not be created seems wrong. Or *could* it be created? In which case that statement that it shouldn't be created is wrong. (Or, of course, I'm misunderstanding things.) _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com