On Mon, Dec 1, 2014 at 5:48 PM, Francis Giraldeau <
[email protected]> 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
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to