2 ms·
Reading the article, I've realised I do now support a Python 2.8, but I personally believe it should have only one feature... There's no getting around the fac
by ZenoArrow 13y ago
Reading the article, I've realised I do now support a Python 2.8, but I personally believe it should have only one feature...
There's no getting around the fact that large Python codebases have been built up in 2.x. Going forward, there are three paths for the developers of these codebases to take:
1. They can stay with Python 2.x until the lack of updates becomes a problem.
2. They can attempt to switch out Python 2.x code with Python 3.x code where appropriate.
3. They can choose to rewrite with a language other than Python.
Of the three options, which is the least beneficial to the Python community? The third one. Which is the most beneficial? The second one. To enable this, it makes sense to enable easier mixing of Python 2 with Python 3. So the 'one feature' I'd like to see in Python 2.8, if it is ever made, is to be able to interpret both Python 2.7 code and some set version of Python 3.
How would the interpreter know the difference? The code could easily be labeled using comments, such as how the "# -- coding: utf-8 --" switch works. It's not a new idea, it'll be very familiar to many developers (references to HTML and XML schema spring to mind).
This way everyone wins, Python 2 developers get the chance to move to Python 3 as and when it makes sense, Python 3 developers can make use of Python 2 libraries until the ports are ready, and it should be (relatively) easy to implement.