C API ?: checking if an object is a class

Martin von Loewis loewis at informatik.hu-berlin.de
Sun Aug 12 07:04:14 EDT 2001


Tavis Rudd <tavis at calrudd.com> writes:

> how do I check if a PyObject is a class object?
> Is there any equivalent of PyInstance_Check() that can do 
> this or do I need to use PyObject_Type()?  If it's the 
> later where do I get the 'class' PyType object?

Just use PyClass_Check.

Regards,
Martin



More information about the Python-list mailing list