lost Hashability with __cmp__

Martin Schmettow martin.schmettow at bibliothek.uni-regensburg.de
Wed Jan 29 15:27:52 CET 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