Example (builtinmodule.c):
static PyObject *
builtin___import__(PyObject *self, PyObject *args, PyObject *kwds)
{
...
}
How do I go about getting the arguments, args
, in string format? I believe it would be similar to finding the name of a function (if a callable PyObject was a function: PyString_AsString(PyObject_GetAttrString(func, "__name__"))
), but I don't know what attributes to look for in the args
.
The easiest thing to do is just get the repr of the object, since it's a tuple.