This time we visit the topic "Should I use Python 3 as it is the latest version or should I stick to Python 2 because most of the internet says so?"
Disclaimer: I am quite Python 3 sided and looking for more of its drawbacks, so feel free to disagree with anything.
- Syntactical, best shown by the print function.
- Division with integers now outputs decimals if needed
- Unicode as default character encoding
And with the technical stuff out of the way, let's see what divides the community.
The main pro Python 2 argument is that every library ever is written for it and if one switches to Python 3 won't be able to find and use any of them. I believe this argument is quite outdated as Python 3 is now 10 years old and many libraries are now updated and functional. Some teams even start a project and in case the needed library is missing they code it, document and upload it. Very kind of them, isn't it?
Right now the only libs you can't find are the really obscure and unpopular ones. But if you are lucky one of the teams mentioned above will stumble on them and make it available to the rest of us!
Python 2.7 is no longer under development and in 2020 will even be discontinued. In contrary Python 3 will have new features, active support and stable releases.
The only reason I thought was not outdated about sticking with Python 2 is the following.
One might be in a large company and all the code is written in Py2. Refactoring to Py3 will not only halt the development but also cost money as the engineers tampering with the code must get paid.
As quoted by the Python team:
"Python 2.x is legacy, Python 3.x is the present and future of the language."
What is your opinion on the matter?