1.2. Python 2 or 3?¶
There are (still) two versions of Python in the wild: Python 2 and Python 3. Now, as Python 2 has finally reached end of life (as of 01.01.2020), the answer is crystal clear: use Python 3.
Note
This section is here for rather historic reasons. Python 2 shall not be used any further for new projects, and all existing projects using this version should definitely be ported to Python 3. However, part of the reality (not only) in science is the habit of “never change a running system”, therefore you might still get in touch with old Python 2 code.
1.2.1. Python 2 end of life¶
Those interested in the whereabouts of Python 2 end of life (EOL) may find the following information useful:
1.2.2. But I have old Python 2 code¶
Spend all your available time porting this code to Python 3 as soon as possible, making use of such tools as 2to3.
If that’s not possible, e.g. due to legacy code from a vendor, wrap it and minimise the interaction with the old code to a single place in your project if ever possible.