On 5/15/08, Dag Sverre Seljebotn <[EMAIL PROTECTED]> wrote: > Lisandro Dalcin wrote: > > 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. > > > Do you have a real example where this would be genuinely useful?
Perhaps I'm just asking for too much magic from Cython's side. But I already have a working project, wrapping the MPI specification (C API with more than 500 C definition summing up functions and constants), and in the current status of cython-devel-py3k I'm able to generate C source files that are going to compile and run against Python 2.3 to Python 3.0, Moreover, I can distribute a single set of generated C sources (I do not want users have to install Cython to build my package), and they build and the final extension module work just fine. I would definitely love that this degree of compatibility is maintained, not only for the easy of maintaining of my project, but also I'm pretty sure that other developers using Cython for serious work would also REALLY appreciate that. > My very subjective and unfounded feelings: Creating some super-language > which supports both 2 and 3 completely transparently is likely going to > either have too few features to be useful, or be such an effort that > it's not worth it. Well, I would love to see Cython language to be more near Python 3 language, just because Py3 it is a better languaje. Once Cython can parse Py3 sintax, I will readily update my code to that sintax, but I still would require and work for the generate C sources work at least on Python 2.4, better if also in 2.3 . I have users of my code running parallel applications on clusters with dated systems providing Py2.3; I would really avoid those users to ask them for building Python from sources (plus other packages they depend on) just because I like to be in the bleeding-edge Cython, who do not support C-level compatibility with Python 2.X. > Having Cython output Python 3 compileable C code > (from current Cython/Python 2) is however a great way of enabling people > to write Python 3-specific Cython code before we get to the stage where > there is Python 3 syntax support in Cython itself. Indeed. Furthermore, IMHO Cython support for Python 3 syntax could be even extended. Python 3 does not let you to do u"abc" for an unicode literal. Should we really have this restriction in Cython? Unless there is a good reason, I would ask this for being accepted. > (BTW, can we find some standard terminology for talking about this? > Something like "Cython": pyx -> c stage; then it is a c-file and not > Cython, and then "C compilation": c -> executable stage.) Agreed, Let's use "Cython compilation" for the pyx -> c stage, and "C compilation" for the c -> so stage (or whatever extension extension modules have) -- 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
