On Mar 13, 2010, at 2:26 AM, Robert Bradshaw wrote:

> The stated goal for Cython 1.0 is to compile and (correctly) run any
> Python code. In practice, this means I should be able to take any
> piece of Python code and safely compile and run it without any changes
> (perhaps with a --pedantic flag if some corner cases are considered to
> expensive to not be worth handling, though none come to mind at the
> moment). This can't be the case if the Cython language (which is also
> too ill-defined) is a mixture of Py2 and Py3 semantics (where the
> syntaxes overlap). Given that the we currently have Py2 semantics for
> nearly everything, and have the __future__ directives, until we hit
> 1.0 at least it makes the most sense to stick with that. (It's also
> inline with the "easiest way to port code to 3.x :)). Thus the refined
> goal would be be supporting any Python 2.6 code compiled against
> Python 2.6 to have exactly the same behavior (modulo obvious
> differences like introspection) as if it were interpreted.
>
> I think it would be a good idea to have flag/directive for compiling
> code with Python 3 semantics, and perhaps eventually switch over to
> that by default (or in a 3.x context?) after throwing in some warning/
> deprecation code in there, but the time to make such backwards
> incompatible changes is not now.

That was a bit rambly. My main points are

     - With closures around the corner, and generators soon after,  
we're getting to the point that we need a very specific goal and  
metric for "total Python compatability."
     - With all the other changes going on, I don't think switching  
things over to Py3 semantics by default is a good move right now.  
Better to do it when things are more stable.

- Robert

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

Reply via email to