Aaron DeVore wrote: > In most cases I'm checking for whatever is generated by cdef class Foo: > ... I'm not sure if that would be a type or a subclass.
It's a type, aka new-style class, so both PyObject_TypeCheck and PyObject_IsInstance will work equally well, and they will both accept either that exact type or a subclass of it. PyObject_TypeCheck is probably a bit faster, since it doesn't have to worry about dealing with old-style classes and instances. -- Greg _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
