Hashability?

Chris S. chrisks at NOSPAMudel.edu
Mon Jul 19 14:58:02 EDT 2004


Chris S. wrote:

> 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.

I understand the issue now. My thanks to everyone who responded.



More information about the Python-list mailing list