Python is the language that really got me jazzed about programming. Not for any particular reason apart from I could just do stuff with minimal hassle. I didn’t have to worry myself about memory management, process, threads, types, or anything of that nature. I knew eventually I would want to- and did- get into the weeds of the aforementioned topics, but I didn’t have to and it was great. Python kinda just got out of your way and allowed you to do the thing you wanted to do when first starting out. This could be learning about data structures, firing up a web server, or scrapping Amazons listing for not other reason than you could. Since Python is not a compiled language, you don’t have to worry about compilers and could just python3 main.py (or these days, uv run main.py) that sucker and be off to the races.
It also is, in my opinion, the most readable programming language and one that can be written the most elegantly. I still remember when I first went through Fluent Python by Luciano Ramahlo. The first chapter on the Python data model is one of the best of any modern technical book I have read for Python. The way the author builds up a french card deck using a small class, named tuples, and the double underscore (dunder) methods is a master class. But he doesn’t stop there, in the same chapter you don’t only learn how to write good Python, but the author also begins to show you how to think Pythonically. You use the __len__ dunder so that users of you code don’t have to try and remember what you named your length method. You don’t add a custom random choice method to your class because Python already provides this to you within the Python Standard Library. I highly recommend anyone wanting to get better at Python check out that book, but if anything, the first chapter will certainly help.
But the reasons why I really enjoyed Python are, paradoxically, the very same reason’s I have lost my love for it today. Undoubtedly, if you learn some of the principle’s above you will become a better programmer just by the way you’ll be training yourself to think. I also believe that although very few people are still manually writing code anymore, code that is written idiomatically will be easier to review, and, will be more efficient for any human-or-non-human entities attempting to interact with your code, but I digress. The first point is that LLMs write about average Python. Not utterly terrible, but not great and tends towards utterly terrible if you leave the statistically genie unchecked. Because its often good enough, there is very little if no reason to make it better, the trade-off simply isn’t there. What you are left with is perpetually reviewing average to bad Python at an incredibly high rate which is extremely draining. It can feel like a draining barrel that your trying to plug and another hole pops up as a result. At least one of the reasons this is the case is because Python is a dynamically typed language. We developers try and circumvent this reality by trying to force Python to become a statically typed language via a whole host of tooling.
Mypy, Ruff, Complexipy, and whatever else we can conjure from the depths of uv. We reach for any tooling we can to give us some semblance of assurance that our code is bug-free and not going to explode when we deploy it, but that guarantee just isn’t possible, and now, we have littered our codebase with a few monstrous type hints that almost become a language in and of themselves (see this article for a very humorous example of how this get unwieldy) and we have spent a shockingly long amount of time debating whether to annotate one of the parameters in our 6 line function with a Collection, Sequence, or an Iterable. Now, we are at the point where we are hardly writing the same language the Luciano was writing in his book.
I hope this doesn’t come off as me hating on Pythons tooling or type hints, I think they are great for Python. But when a project tries to suffocate all the things that make Python what it is to try and elicit development guarantees that will simply never be realize it just makes for an awful time. I don’t think there is any going back from here for Python in the modern day, unfortunately. In the world of LLM enhanced development Python will stay in this limbo, and eventually I hope developers will move to a language that can actually provide a few more of the assurances we are after. We have already seen this with Rust, but I’m hoping we trend in the same direction with Go as well.