Should I store Python code on 2.x or port it on 3.x if I plan to end up using Jython?

I have a great infrastructure written in Python 2.6, and I recently took a hit at porting to 3.1 (it was much smoother than I expected), despite the lack of backward compatibility.

Ultimately, I want to integrate part of this Python code with the large amount of Java code that we have, and was thinking of trying Jython. However, looking at Jython tutorials, all examples are given in 2.6 syntax (for example, printing is not yet a function).

Will / will Jython support Python 3.x syntax now or in the near future? Or do I need to go back to 2.6 if I want to end up using Jython?

+4
source share
3 answers

Jython will not support Python 3.x in the near future. For your code, I recommend storing it in 2.x format, so that 3.x support becomes available just by launching 2to3 (i.e. without additional source changes). IOW, port up to 3.x so that the code remains compatible with 2.x.

+5
source

I would expect developers to work on compatibility with 3.0 at the moment. Since they released 2.5 in June, I would have hoped for version 3.0 no earlier than January-March. 2010, but given their slow release cycle, this may be a while.

0
source

Over time, 2.x will surpass the new features of its 3.x. If you want to program in Python in the future, then "sooner = better"

0
source

All Articles