Robert Bradshaw wrote: > The problem is that isinstance is declared to take an object as the > second parameter, and the optimization happens later on.
I'm not sure why you need compiler hackery to do this in the first place. Why not just declare isinstance in the builtin functions table as the equivalent of int isinstance "PyObject_TypeCheck" (object, type) A runtime type test will get generated if the second argument isn't known to be a type, but that's probably a good idea anyway, since PyObject_TypeCheck is expecting a type and will likely crash if you give it something else. -- Greg _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
