We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f447e5 commit 0c4926bCopy full SHA for 0c4926b
stringdtype/stringdtype/src/dtype.c
@@ -483,9 +483,8 @@ static PyMemberDef StringDType_members[] = {
483
static PyObject *
484
StringDType_richcompare(PyObject *self, PyObject *other, int op)
485
{
486
- // this isn't very friendly to subclasses
487
if (!((op == Py_EQ) || (op == Py_NE)) ||
488
- (Py_TYPE(other) != (PyTypeObject *)&StringDType)) {
+ (Py_TYPE(other) != Py_TYPE(self))) {
489
Py_INCREF(Py_NotImplemented);
490
return Py_NotImplemented;
491
}
0 commit comments