On Nov 24, 2009, at 1:18 PM, Lisandro Dalcin wrote: > On Tue, Nov 24, 2009 at 5:32 PM, Stefan Behnel <[email protected]> > wrote: >> >> Joachim Saul, 24.11.2009 20:59: >>> cdef extern from "Python.h": >>> ctypedef class __builtin__.str [object PyStringObject]: >>> pass >> >> Remove the above and use the 'bytes' type in the rest of your code >> instead. >> 'str', 'unicode' and 'bytes' are builtin types in Cython.
This isn't really addressing the issue, just sidestepping it by enforcing unicode safety. > Anyway, any good reason for such code to fail in Cython? Should we > support such declarations of builtin types? I think Cython should be > able to compile as much Pyrex code as possible. I agree, it shouldn't fail (though perhaps there should be a warning). The underlying issue is that it doesn't recognize that the user- declared type could be compatible with the builtin type. We should recognize this and allow it. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
