On 5/15/08, Dag Sverre Seljebotn <[EMAIL PROTECTED]> wrote: > I think: > > - The default "Python language level" for the pyx source when Cython is > run should be that of the interpreter Cython is launched within.
I definitelly disagree with you. Cython 'pyx' has the chance of being more backward compatible even that source 'py' files. I would instead propose the following: * Iff 'from __future__ import unicode_literals' is issued, then Cython should generate unicode strings REGARDELESS of the C-generated compile time Python version. In Py2.X, that would be 'unicode' type, and in Py3, 'str' type. * Iff 'from __future__ import unicode_literals' is NOT issued, then at compile time, Cython should create strings as is the default in the compile-time Python version, that is, (byte) 'str' type as in Py2, or (unicode) 'str' type as in Py3. * Iff string literals are prefixed with 'b' as in b"abc", then Cython sould create at compile time a (byte) 'str' type object in the case of Py2.X (note: Python2.6 already does this), and a 'bytes' instance in the case of Py3. Now the question is: can this be done? Does this make sense ? Perhaps I'm still confused about the whole stuff. In such case, please ignore me. -- 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
