lost Hashability with __cmp__

Martin Schmettow martin.schmettow at bibliothek.uni-regensburg.de
Wed Jan 29 09:27:52 EST 2003


Hi all.

I declared a __cmp__ for a class. Now I get an TypeError: unhashable 
instance if  I use objects of this class as keys in a dictionary.
Can someone explain why and how I can gain back hashability?

Thanks
Martin.





More information about the Python-list mailing list