8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
super()
1 parent 4afa7be commit 3b7e6fdCopy full SHA for 3b7e6fd
Objects/typeobject.c
@@ -10389,9 +10389,13 @@ supercheck(PyTypeObject *type, PyObject *obj)
10389
Py_XDECREF(class_attr);
10390
}
10391
10392
- PyErr_SetString(PyExc_TypeError,
+ PyErr_Format(PyExc_TypeError,
10393
"super(type, obj): "
10394
- "obj must be an instance or subtype of type");
+ "obj must be an instance or subtype of type. "
10395
+ "Got obj: '%.200s', type: '%.200s'.",
10396
+ PyType_Check(obj) ? ((PyTypeObject*)obj)->tp_name : Py_TYPE(obj)->tp_name,
10397
+ type->tp_name);
10398
+
10399
return NULL;
10400
10401
0 commit comments