how to tell if x is an instance of new class?
Michal Vitecek
fuf at mageo.cz
Thu Aug 19 11:05:56 EDT 2004
hello,
i'm (once again) fighting with python C API. i'm simply unable to
determine whether 'x' is an instance of new class or not.
result of PyObject_Type(x) is unusable, PyType_Check(x) returns 0,
PyType_IsSubtype(x->ob_type, &PyType_Type) returns 0,
PyType_IsSubtype((PyTypeObject *)x, &PyType_Type) returns 0...
how come there's no *easy-and-immediately-obvious* way to get such an
important information? what am i missing?
HELP!
--
fuf (fuf at mageo.cz)
More information about the Python-list
mailing list