Python/Which Version Should I Use

From Jonathan Gardner's Tech Wiki
Jump to: navigation, search

Understanding Versions

Python comes in a lot of different versions. There are major numbers, minor numbers, and release numbers.[1] You need to understand the numbering system because Python is constantly changing.

Major Versions

Major changes are reflected in the first number, the major version. These are changes that are big and break many things.

Python 0 and 1 are long gone, relics of a time gone past.

Python 2 is on its way out. Fewer and fewer people are using it and it's getting harder and harder to justify using it.

Python 3 is the new version.

If you are new to Python, learn Python 3. If you'd like to use a library that is only available in Python 2, then we need to help you get it updated to version 3, which shouldn't be too hard.

Minor Versions

Minor changes are reflected in the second number, the minor version. These are changes that are big but do not break anything if at all. Keep in mind that there may be some breakage when you skip a minor version, but it shouldn't break anything to upgrade a single minor version. (IE, 2.5 -> 2.7 is risky, but 2.5 -> 2.6 is not.)

As of now, Python 2.7 is the current minor version for Python 2. If you choose to do Python 2 programming, use this version. Do not use 2.5 or 2.6, unless you're working on old code that hasn't been updated yet.

Python 3.4 is the version of Python 3 you should be using, unless you are working on old code. Python 3.5 is coming out soon, but I recommend holding off for a while before adopting it.

Bug fix Versions

The third number is for changes that don't break anything. These are bug fixes, incremental releases. Feel free to upgrade to a new bug fix version. In fact, try to do it ASAP when a new version comes out. Your code should not break at all.

Conclusion

Grab the latest version of Python 3.4.