this post was submitted on 08 Jun 2025
515 points (97.2% liked)
Programmer Humor
36796 readers
304 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Partially unrelated to the meme, but I find it almost malicious how some python keywords are named differently from the nearly universal counterpart of other languagues.
This/self, continue/pass, catch/except and they couldn't find a different word for switch so they just didn't implement it.
It's as if the original designers purposefully wanted to be different for the sake of it.
Python does have a
switch
statement now, actually. And yes, they went out of their way to call it something different -match
.https://docs.python.org/3/tutorial/controlflow.html#match-statements
match
isn't just equivalent toswitch
though, so in this case it actually makes sense to call it something different.This is very true. Match statements are much more powerful that switch statements in any other language.
For instance: