I think this is more like a rant.
Holy Christ! I’ve been using Python to do some simple scripts here and there, and what a terrible language to deal with (yea, terrible, just down vote and move on, I need to say it somewhere).
Why would anyone change so many standards? I often need to deal with PHP/JS at the same time and I don’t have a single issue, they feel like the same language in practice, but when it comes to Python everything changes.
I just hate this more human-readable philosophy of Python, we need a common ground to communicate with the machine, I don’t want fancy keywords or syntax, it’s not that hard to learn a new syntax, it might take a few days, it’s not worth the trade off of changing so many standards that older languages came with.
For some reason every single code I write feels aesthetically ugly. I feel like the letters are just floating around without brackets and curly brackets.
I often mistake a lot of:
for x in list:
With:
for (x in list):
And it’s done, syntax error, I need to go back and do it “Python way”. It’s way harder to read Python code than anything else, I want to read what the for loop expression is evaluating, and the lack of brackets make it harder to assimilate.
Don’t even let me talk about types! Why would you provide a way to type parameters but don’t enforce it at runtime? Jesus Christ! It could be simple: if you type a parameter, you want it to be checked, if not, you wouldn’t type anything. You need to import built in types, why would any human on Earth make a decision like that? (from typing import List, Optional)
Why so many different ways to declare an array-like structure? Tuples, Sets, Dicts, Lists? Dude… ffs, I know each one supposedly has a “different” purpose, I literally don’t see any good benefits on it. It just makes me more confuse.
I’m not talking about 3rd party libraries like mypy, I’m talking about things that should be on language core since the first version.
The more I learn about Python, more it pisses me off. I’m mainly using it because of interoperability, easy to setup, it runs flawlessly in any OS and Python usually comes pre-installed in many OSs, but the experience of developing in this language is just terrible.
I agree in general, never liked Python at all, but this part:
Why so many different ways to declare an array-like structure? Tuples, Sets, Dicts, Lists? Dude… ffs, I know each one supposedly has a “different” purpose, I literally don’t see any good benefits on it. It just makes me more confuse.
It just speaks of your inexperience. You mention Java in the title, you’ve never worked with HashMap and other basic collections? This isn’t something Python changed, it’s a staple in modern programming languages. And with “modern” I mean that Map was added to Java in version 1.2.
If you want, here is my framework when I am full of frustration but seek answers:
- Open new file
- Write my thoughts unleashing all the frustration I have
- Calm down
- Put the file to trash
- Open new file
- Write my thoughts and question in a respectful way to engage in healthy conversation
- Copy and send online
What do you mean by “change standards”? Python is older than all the other languages you mentioned other than C.
You should go back to the basics of computer science if you don’t know the difference between lists, maps, sets, and tuples.
As someone that hates python more each day: you are absolutely wrong on basically every point.
The only thing you are right on is the non-enforced types (not even warning logs!).
First, python doesn’t “change all the standards”. Languages are different. If they weren’t different, there would only be one language. There is no language standard.
for (x in a)is stupid. You want to know what is the “expression” of theforloop? It’s everything after theforand before the:. You don’t need()at all. In fact()would be confusing since you could argue theinis part of the for loop syntax.You don’t need to import the types you claim you need to import. list, tuple, dict (idk about set) are available without importing.
I won’t even explain why you are wrong about data structures and tuples. Just that they are not “array-like”.
It doesn’t run flawlessly on any OS. Many OS ship with ancient versions of python. So it’s incredibly easy to have your script not run on another computer because you used features that are too new. There are also 3rd party dependencies that are OS-dependant. But you cannot know that until you run it and it fails on some random function call. And after hours of research you figure out that that error is because your OS is not the same as the developer’s.
I don’t necessarily love Python either, but it sounds like your perspective is a little limited.
Why would anyone change so many standards?
You happen to have almost exclusively used languages that are syntactically descended from a common ancestor, Algol. If you had learned a LISP descendant, or another non-Algol language such as ML, Prolog, APL, or Haskell, you’d probably be less surprised by Python not following the Algol-ish syntax.
Why would you provide a way to type parameters but don’t enforce it at runtime?
As another commenter mentioned, this is basically just a result of Python’s historical development. Explicit types are fully optional, and originally did not exist: the type annotations idea wasn’t even created until 2014, over two decades (!!) after Python’s initial release; and that was just the initial theoretical groundwork, not an implementation of anything. To introduce explicit static typing into a language that is dynamically or implicitly typed, without breaking legacy code, requires gradual typing, an idea that is relatively recent in the history of programming languages, and there are different approaches. The TypeScript approach may seem like the obvious “right” way now that TypeScript has become so dominant in the JS ecosystem, but it was in no way obvious that TypeScript would be so successful back when it was introduced, which was right around when Python started developing its gradually-typed system. So Python took a different approach: rather than designing a new language as a superset of the existing language, and writing a compiler to typecheck the new language and strip type annotations, they added a syntax for type annotations into the language, so that the code you write is still the code that actually gets interpreted, but decided that actually enforcing type-checking should be left to separate tools rather than the Python interpreter. Personally, with the benefit of hindsight, and as someone who has not used Python much and prefers Rust-style static typing, I think the TypeScript way is better. But I don’t think Python is likely to evolve in that direction.
Why so many different ways to declare an array-like structure? Tuples, Sets, Dicts, Lists? Dude… ffs, I know each one supposedly has a “different” purpose, I literally don’t see any good benefits on it. It just makes me more confuse.
They are called data structures. Dude, if you can’t tell the difference between them, I question the kind of code you’re writing. Did you learn writing php first?
It sounds like you didn’t study computer science but picked up coding as a side hustle and have yet to understand the absolute basics. Maybe pick up a book or follow a course someday. Things will make more sense then.
Well… studying computer science in order to write production code, is like studying chemistry to become a chef.
I can assure you, unlike OP, I am comfortable using different collection types as the tools they are, even without having spent years studying the theory behind them.
You have picked some weird hills to die on there.
for x in list:
This is fine. Many languages now do it. The extra brackets around a for or if dont really add any clarity or make things easier or harder to read. This is the type of thing you just get used to and prefer what you are used to. You get over it quickly.
Why would you provide a way to type parameters but don’t enforce it at runtime?
This is a bit stupid, but really is legacy reasons for it. Since it didnt use to have static type declarations and wants to remain somewhat backwards compatible it needs to ignore them at runtime. But as a JS and PHP developer you should be used to this. Both do the same thing as python here with types (well, TS for JS and the many other attempts at getting types into JS). So it is weird that you are singling out python for this behavior.
Why so many different ways to declare an array-like structure? Tuples, Sets, Dicts, Lists?
DIcts are not array like here. Tuples sets and lists are all common is many languages as well. PHP is a real weird case here given everything, even arrays are effectively a dict - that is a strange language design feature. But Java is way worst for different types of array types in the language.
I’m mainly using it because of interoperability, easy to setup, i
What? I hate setting up python projects. Each one wants to use a different dependency or version manager. Yeah you might have python on most systems but they are all different versions and python is famously terrible at backwards compatibility. It seems every few versions they throw something in the breaks some existing scripts so you really need a version manager for things. Which is more complex setup and management of things. There are far too many different tools to help you with this and fetching dependencies which means if you work on lots of different projects by different people you have a hodge podge of diffing tools you need. It is a complete mess.
Personally I hate python as a language, but you have picked some minor points that IMO dont really matter or that the other languages you use also suffer from. There are far better things to pick from that are far more annoying in the language.
It’s been a while I don’t use JS without TS, so idk. But PHP enforces type check at runtime, latest versions you can declare argument types as classes, interfaces, etc… It’s a very pleasant experience IMO.
Idk I have more reasons to hate it, I’m just thinking if there’s any good reason to not forget the existence of Python and go back to TS as a general purpose scripting language.
Regardless of whether the internet tells you anything or not, just do whatever the fuck you’re happy doing. If you want to code in cobol code in cobol, if you want to code in js code in js, if you want to code in python code in python.
Wait until you try Rust… 😅
I’m not a fan of python so I was prepared to commiserate but…
Tuples, Sets, Dicts, Lists
These are all useful in every language… I don’t use tuples that often, but lists/arrays and associative arrays/dictionaries/hashmaps are in every language and completely different from each other, and there are plenty of reasons to use sets when that is what your data actually is and you get easy access to set operations
You seem to have settled on an opinion and accompanying emotional response already. If so, why are you still using Python if your prior experience isn’t a good fit for it? Not everything is made for everybody, maybe Python just isn’t for you.
Your complaints mostly revolve around syntax. I’m sure there’s a dynamically typed, sequential language with curly braces — y’know, “standard” — out there for you. You could even convince a Scheme reader to accept something like that instead of brackets everywhere 🤷
I do like python’s syntax, and I think it’s very expressive. But what I really enjoy about working in it over years is that it has standards that can help you write good software — there’s often one best official package to do something, there’s one style most libraries adhere to, etc — and the older ways often get deprecated. When I’m working with PHP and js, especially, that’s what consistently footguns me: closely related library functions that follow different styles/conventions, inconsistent error handling.
So I guess if you’re going to hate Python maybe that’s it. But if you’re stuck with it and want to see what you can see, those aspects could be something to reflect on. (Saying this as someone currently stuck with a bunch of legacy Perl I pretty well hate.)
To me I find python incredibly easy to work with. Specially on data transformation scripts that just grab from someplace and interpret it and places it somewhere else. I do not like having to develop big projects on it as dynamic typing makes it a bit harder to know what is what as the program gets more complex but just don’t use it for those bigger scope projects
Yeah, man. Critical-whitespace languages suck donkey cock, no doubt.
Python is fine for like, short, single-file programs and apps. Python is great for quickly testing out ideas!
But it’s a nightmare if you wanna develop anything serious.
Python and that
venvbs is just awful and real apps should use a real language; I suggest Rust, but there are other almost-as-good languages out thereI guess if the serious thing you’re doing is a CRUD app?
Tell that to YouTube and Spotify. Or astronauts on the ISS. Or anyone doing science really…
Machine learning and CV? Geospatial? Math in general?
The right language for the job often boils down to the one your most familiar with. If you like a certain syntax and stronger typecast i can understand. I had a hard time when I was learning the language as well and like you coming from php and ecmascript background. However I learned to love python. But respect peoples opinions, you’ll be getting no downvote from me. Rant on!
As someone who just had to take an Intro to Python course, I commiserate and validate your grievances. An unnecessarily infuriating language.
I thought I was getting crazy because so many people say it’s the best thing ever, that can’t be true man. I mean maybe it has some pros but it’s not all that.





