I’m inspecting a PyObject *obj (within the mpi4py module) by printing Py_TYPE(obj), which yields:
Type=<class 'method_descriptor'>
Keying in on the “method_descriptor” string and looking at CPython’s source code, obj appears to be a PyMethodDescrObject object, whose type is PyMethodDescr_Type.
For other types, there are C Python API calls to check whether or not obj is of that type, e.g. PyCFunction_Check, PyInstanceMethod_Check, etc. Is there a corresponding function to check whether obj is of type PyMethodDescr_Type? If not, what is the recommended way to do this?
I didn’t see any documentation on the type, so its not clear whether it was even meant to be exposed. Was PyMethodDescr_Type superseded by PyInstanceMethod or something? Its unclear to me their relationship