should just avoid calling it in the first place to avoid waiting for a repr
of a large object like a dict or list. The result of PyObject_Repr() was
being leaked as well.
Bugfix candidate!
"NULL result without error in PyObject_Call");
return result;
}
- PyErr_Format(PyExc_TypeError, "object is not callable: %s",
- PyString_AS_STRING(PyObject_Repr(func)));
+ PyErr_Format(PyExc_TypeError, "'%s' object is not callable",
+ func->ob_type->tp_name);
return NULL;
}