OK, let's wait for Stefan/Dag/Greg comments about this. On Thu, Sep 25, 2008 at 2:26 PM, Robert Bradshaw <[EMAIL PROTECTED]> wrote: > 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 >
-- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
