diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 18bea476ea9..51ec93d8752 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -1121,7 +1121,7 @@ type_call(PyTypeObject *type, PyObject *args, PyObject *kwds) /* If the returned object is not an instance of type, it won't be initialized. */ - if (!PyType_IsSubtype(Py_TYPE(obj), type)) + if (!PyObject_TypeCheck(obj, type)) return obj; type = Py_TYPE(obj);