In C / C ++, I want to see if PyObject instance. Unfortunately, the PyInstance_Check macro PyInstance_Check not work with new-style classes.
So, according to the posts in the forums that I read, PyObject_IsInstance can solve the problem. However, all the examples I found demonstrate a comparison with built-in types such as int and strings.
I want to know how I can build a PyObject representing a class of type, so I can pass it into the second argument of PyObject_IsInstance . Can you help me?
source share