are user defined classes hashable?

Alan G Isaac alan.isaac at gmail.com
Sun Jul 19 09:48:16 EDT 2009


Are user defined classes hashable?
(The classes; *not* the instances!)

I want to use some classes as dictionary keys.
Python is not objecting,
but I'm not sure how to think about
whether this could be dangerous.
I'm inclined to guess it will be hashed by id
and this is OK.

Thanks for any insights,
Alan Isaac



More information about the Python-list mailing list