> * Alan G Isaac <alan.is...@gmail.com> [2009-07-19 13:48:16 +0000]: >> Are user defined classes hashable? >> (The classes; *not* the instances!) >> I'm inclined to guess it will be hashed by id and this is >> OK.
On 7/19/2009 10:07 AM Nicolas Dandrimont apparently wrote: > You can check for yourself: > In [1]: class Foo(object): > ...: pass > ...: > In [2]: foo = Foo() > In [3]: hash(foo) > Out[3]: 15294992 > In [4]: id(foo) > Out[4]: 15294992 Again, my question is about the class not its instances, but still, checking as you suggest gives the same answer. Thanks, Alan -- http://mail.python.org/mailman/listinfo/python-list