On May 12, 2008, at 2:18 AM, Stefan Behnel wrote: > Hi, > > Dag Sverre Seljebotn wrote: >> I think "from __future__ import division" is an excellent example of >> supporting multiple language levels in a nice way, it is not that >> horrible to do. > > BTW, I actually think we need to support that anyway if we want to > compile > Python code. Things like > >>>> from __future__ import unicode_literals >>>> from __future__ import print_function > > provide a simple upgrade path for Py3 syntax support. Both would > just be > enabled for plain Python code (.py) when the compiler runs in a Py3 > environment. > > Now that you mention it, maybe changes in Cython and Pyrex could be > enabled by > >>>> from __future__ cimport some_new_pyrex_syntax_feature > > (mind the "cimport") ? We would then still need a roadmap for a > versioned > upgrade path if we add a syntax change.
The from __future__ is a good way of going about doing things. Backwards compatibility is a high priority for us, but I would like to note that we are at the mercy of Python in terms of syntax changes (though they are in general very stable). - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
