3 ms·
I was a die-hard 2.x Pythonista, and as Python 3 started to reach 3.[4/5] releases, in my view it started to get really good in terms of new (and actually usefu
by fb03 10y ago
I was a die-hard 2.x Pythonista, and as Python 3 started to reach 3.[4/5] releases, in my view it started to get really good in terms of new (and actually useful, not just bloated) features. I for instance love the way you can properly type everything, and that equates to proper interfacing, expectancy between object interactions and also (ofc!), better and smarter IDEs.
Also, at the 3.5 release, most "big" libraries and frameworks were already supporting Py3.x in a stable manner, so more and more the point about being at 2.x "because I have this huge library support" got fragile in my head, and I knew what that meant: "Someday, I will actually have to migrate!"
I started getting worried that the 2.x ways were too entrenched in me and that I'd never be able to migrate, that my Python (2.x) skills would become something as forgotten as my former self (childhood) Turbo Pascal antics and etc. Nonsense!
Here's what happened: I was asked to work on the backend of a new website that was aiming for a fully "portable" (desktop, mobile, and whatever comes next) experience. They wanted me to write an API for it, and I started studying what framework I could use that was simple enough for an API (flask!) and for sane backend storage definition (sqlalchemy!)
- Flask on 3.x -> The more I searched about flask on 3.x, the more I found how it was really stable and production-ready. Also, using 3.x would be really nice on the whole Unicode thing, as I would not be able to make the same string/bytestring mixing assumptions I used to do so carelessly in 2.x (until something blew up...) I would actually have to enforce and handle proper Unicode throughout the api.
- SQLAlchemy on 3.x -> Really, the same. Production-ready, used throughout.
These two convinced me to try to get the initial API study on 3.x, and oh boy, besides stumbling here and there with some changed syntax (mostly, simple print()'s during early stages), migrating to 3.x went real smooth!
As I advanced in my 3.x studies, I started to see benefits in typing everything properly, specially between layers/borders, and it meant less typing and more intelligent autocomplete for my pycharm.
Seriously, If you find yourself struggling or anxious about migrating to 3.x, just find yourself a new project and start doing it on 3.x in the most non-pretentious manner. You'll find yourself just as 'at home' as you felt in 2.x, but you'll still feel something changed for the better...you won't feel strange more than 3 days I promise you :DD