Just can't find the right function. Thanks for advice.
-
2You've been asking a lot of questions about the Python C API recently. Have you tried looking at the documentation?icktoofay– icktoofay2012-06-02 05:10:13 +00:00Commented Jun 2, 2012 at 5:10
-
1I knew this function exists, but I couldn't find it easily in the documentation and had to resort to google, so I can see why the OP asked this question.Eloff– Eloff2013-11-24 01:31:52 +00:00Commented Nov 24, 2013 at 1:31
Add a comment
|
1 Answer
You're looking for PyObject_Str:
PyObject* PyObject_Str(PyObject *o)Return value: New reference.
Compute a string representation of object
o. Returns the string representation on success,NULLon failure. This is the equivalent of the Python expressionstr(o). Called by thestr()built-in function and by the