On Mon, 2013-07-15 at 17:54 +0200, Yury V. Zaytsev wrote: > > 1) What's the best way to get Cython to generate (b) instead of (a)?
As it appears, it doesn't really matter, because I've realized that I can import numpy without actually introducing a compile-time dependency on numpy as long as I don't cimport numpy. NumPy objects have a very handy item() method, which "copies an element of an array to a standard Python scalar and returns it", so at this point I can use the standard isinstance() checks against built-ins! > 2) Shall I open a bug against Python and suggest to investigate why > PyType_FastSubclass is not really equivalent to PyObject_TypeCheck as > it should be for the built-in types? FYI, this seems to be a problem with NumPy: https://github.com/numpy/numpy/pull/3526 Hope this helps, -- Sincerely yours, Yury V. Zaytsev _______________________________________________ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel