3 ms·
There is a library (and script) called 2to3 that automates code translation from Python 2 to 3. I wouldn't rely on it for my own projects, but I have seen a num
by brbsix 11y ago
There is a library (and script) called 2to3 that automates code translation from Python 2 to 3. I wouldn't rely on it for my own projects, but I have seen a number of authors use it successfully (e.g. write their app in Python 2 and tell users it is compatible with automatic translation).
If you're on 2.7.x, you can certainly import in quite of the newer features. There are also some resources for writing 2/3 compatible code, such as the six library and http://python-future.org/ http://python-future.org/. It is no problem for fairly trivial applications, but I don't envy anyone who has to ensure 2/3 compat for a large project.
- kansface 11y agoFloobits was forced to write python 6 ... or 2/3 ... for our Sublime Plugin. The python3 experience has been awful enough to completely dissuade me from using python for any other project. Completely breaking backwards compatibility for small features no one cares about was a complete disaster as evidenced by half? of the community still using 2.7.
- collinmanderson 11y ago6% were 3.x in April 2014 https://caremad.io/2015/04/a-year-of-pypi-downloads/ https://caremad.io/2015/04/a-year-of-pypi-downloads/
- deleted 11y ago[deleted]
- collinmanderson 11y ago(sorry, April 2015, not 2014)