Back when Python was just an idea in Guido van Rossum’s mind, the World Wide Web was just being born, APIs were proprietary (if your application had one at all), and everyone was doing scripting in a brand new language called Perl.
Much has changed since then, including the Python language your dad or mom may have used.
Technological change occurs at an exponential rate. The most commonly cited example of this is Moore’s law for hardware; but the law is just as true for software as it is for hardware. Unfortunately with hardware, you end up with a drawer full of old, obsolete cell phones. With software, sometimes the concepts on which the original version were built have changed so drastically that you can no longer just upgrade it with the push of a button.
Unicode & Multilingual Support
This is exactly what happened shortly after the release of Python 2 in 2000 when the Unicode specification was finalized. This spec, combined with the way string
was implemented, crippled Python 2’s ability to support multilingual applications. While the Python community has come up with multiple workarounds, Python 3 was created to provide the definitive solution.
Python 3 has more going for it than just being a Python 2 replacement. (Note that Python 2 has been issued an expiry date of January 1, 2020.) Python 3 is a much cleaner and superior language version all around because:
- Python 3 makes coding more obvious and intuitive by removing duplicate constructs and modules;
- Python 3 simplifies multilingual support, with its core
string
type based on Unicode by default; - Python 3 makes it easier to swap in any print function, now that
Print
() is built-in (rather than a statement); - Python 3’s integer division now automatically promotes to a floating point result
Want more information on Python 2 to 3 migration? Evaluate different options and get the how-to here.
The Path Forward
Python 3 is now the dominant version of Python, having surpassed Python 2 in 2017, and continues to gain momentum with every release by adding key features such as:
- Cross-platform support for extensions, so new modules built on one OS can be shared with users on other OSes
- Cross-platform bootstrapping of the pip command ensures third-party packages and their dependencies can always be installed properly
- Support for virtual environments enables multiple installs of Python on the same system and thereby simplifying things like testing on Python 2 vs 3
- And many more!
All these new features come at the cost of forfeiting push-button upgradability between Python 2 and 3. While there are a number of solutions that can help with code migration, all of them will require work to implement.
Want more info on what’s new in Python 3? Check out our post on Python v3.7.
Unable to Migrate to Python 3?
For some organizations, migration to Python 3 might just not be possible. However, community support for Python 2 will stop after January 1, 2020—that means no more security fixes, patches or updates, leaving your applications vulnerable.
If you’re unable to migrate to Python 3, don’t panic! ActiveState provides Python 2 commercial support options to help keep your applications safe. Request a risk assessment today, and we’ll work with you to create a custom support plan for all the Python 2 libraries and third-party packages in your app.