If you are like me, when you first started digging into the world of Python (and perhaps DevOps), you were quickly confused (and maybe dismayed) by the chatter and concern over Python version 2.X or 3.X in your environment. Here is my attempt to make this all make sense for you!
Python 2.0 landed in about the year 2000. It was released by the BeOpen Python Labs team. This release was a huge success, and the final version of 2.X code is now named Python 2.7.
The Python 3.0 release occurred in 2008. This was a big deal as it was a rewrite of core functions AND it was a release that made for only FORWARD compatibility. You would need to START from 3.0 to go to 3.1 (for example).
Was Python 2.7 flawed? Is that why this dramatic shift took place? The answer is – NO! One of the main reasons for the 3.X shift was to make Python support what is called “typing”. This permits variables to be assigned to a “type” field. This makes the creation of new code much easier. The fact that Python 2.7 was an “untyped” language was hindering new development.
OK – so what does all this mean for you? Just ask yourself some basic questions – like:
- Do I even need to care about Python 2.7? You might be just starting your IT education so you will just start with the “future” of Python – Python 3.X.
- Are you working at a job where you will be supporting a huge Python 2.7 code base? Well, you might want to focus on everything you can do with 2.7, and just nose about the new 3.X features when you have time.
Notice there are grey areas here, but I hope this post helped to quickly clear up any confusion you might have as you start your DEVCOR journey.