[issue2235] __eq__ / __hash__ check doesn't take inheritance into account

Amaury Forgeot d'Arc report at bugs.python.org
Wed Mar 5 01:05:34 CET 2008


Amaury Forgeot d'Arc added the comment:

I noticed that my patch uses Py_TYPE(self)->tp_hash, whereas normal
processing of slot_tp_hash() uses lookup_method(self,"__hash__",hash_str).

I am almost sure that both expressions return the same value.
Is this correct? Py_TYPE(self)->tp_hash seems much faster.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2235>
__________________________________


More information about the Python-bugs-list mailing list