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 0eb0160 commit 1a6a50eCopy full SHA for 1a6a50e
Objects/typeobject.c
@@ -11077,6 +11077,15 @@ add_operators(PyTypeObject *type)
11077
ptr = slotptr(type, p->offset);
11078
if (!ptr || !*ptr)
11079
continue;
11080
+ if (type->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN
11081
+ && type->tp_base != NULL)
11082
+ {
11083
+ void **ptr_base = slotptr(type->tp_base, p->offset);
11084
+ if (ptr_base && *ptr == *ptr_base) {
11085
+ /* It must have been inherited (see type_ready_inherit()).. */
11086
+ continue;
11087
+ }
11088
11089
int r = PyDict_Contains(dict, p->name_strobj);
11090
if (r > 0)
11091
0 commit comments