Hashability?

Chris S. chrisks at NOSPAMudel.edu
Mon Jul 19 04:50:47 CEST 2004


Perhaps this is obvious to some, but why are dictionary keys constrained 
to hashable objects? why not use the object's id for the hash value. 
Wouldn't this allow typically non-hashable objects to be used as keys? 
I've done this in several instances and I've never encountered a problem.



More information about the Python-list mailing list