So how do I go about getting PyObject_TypeCheck working?

-Aaron

On Mon, Sep 22, 2008 at 4:30 PM, Greg Ewing <[EMAIL PROTECTED]>wrote:

> 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
>
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to