[Python-Dev] LTTng-UST support for CPython

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Dec 2 02:33:53 CET 2014


On Mon, Dec 1, 2014 at 5:48 PM, Francis Giraldeau <
francis.giraldeau at gmail.com> wrote:

> - On the C-API side: I did a horrible and silly function show_type() to
> run every Py*_Check() to determine the type of a PyObject *. What would be
> the sane way to do that?


Questions like this are better asked on a users' forum, but you can get the
type name from a python object as follows:

Py_TYPE(obj)->tp_name
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20141201/b7ac6c1a/attachment.html>


More information about the Python-Dev mailing list