On Sep 25, 2008, at 9:18 AM, Lisandro Dalcin wrote: > If we do 'isinstance(obj, str)', then what should be the behavior in > Py2 and Py3? In fact, this question is actually related to the map in > builtin_types_table at Cython/Compiler/Builtin.py. Do it make sense to > do the map like this > > bytes -> PyBytes_Type > str -> PyString_Type > unicode -> PyUnicode_Type > > But this would require to #define 'PyString_Type' to 'PyUnicode_Type' > for the Py3 case, instead of the current approach of being it #defined > a 'PyBytes_Type'.
I think this is the right idea. > My mind still resist the idea of not being able to tell Cython 'this > is the built-in 'str' type you use in Python code, whatever it is in > Py2 or Py3'. Me too. - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
