robertwb / issues-import-test

0 stars 0 forks source link

"__hash__ = None" in a cdef class should disable hashability #984

Open robertwb opened 10 years ago

robertwb commented 10 years ago
cdef class MyType(HashableBaseClass):
    __hash__ = None

should set

MyType.tp_hash = PyObject_HashNotImplemented

to disable inheritance of the base type's tp_hash slot.

http://thread.gmane.org/gmane.comp.python.cython.user/11569

Migrated from http://trac.cython.org/ticket/831