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?

1) If you are only creating a wrapper around simple C source, then you 
need to know very well whether you are dealing with unicode or bytes 
anyway (and encode explicitly to the right representation).

2) If you are doing anything more advanced, odds are you are using the 
standard library anyway, and then your code will more than likely break 
between Python 2 and 3 anyway (from what I hear).

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. 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.

(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.)


-- 
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to