Author therve
Recipients therve
Date 2007-12-03.13:51:30
SpamBayes Score 0.0608274
Marked as misclassified No
Message-id <>
A new behavior was introduced in r59106 in python trunk, which look
suspicious to me. Basically, every time a class defines a comparison
operator, it's __hash__ method is defined to None. The simple following
example shows it:

>>> class A(object):
...     def __init__(self, b):
...             self.b = b
...     def __cmp__(self, other):
...             if not isinstance(other, A):
...                     return -1
...             return cmp(self.b, other.b)
>>> hash(A(2))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'NoneType' object is not callable

The problematic change is here:

And mainly the overrides_hash call in inherit_slots.

FWIW, I've encounter the problem because zope.interface is now usable on
Date User Action Args
2007-12-03 13:51:31thervesetspambayes_score: 0.0608274 -> 0.0608274
recipients: + therve
2007-12-03 13:51:31thervesetspambayes_score: 0.0608274 -> 0.0608274
messageid: <>
2007-12-03 13:51:31thervelinkissue1549 messages
2007-12-03 13:51:30thervecreate