4 ms·
I’m not sure I understand the “this is why” part. Python wants to let you override almost everything. It’s a feature and a powerful and occasionally helpful one
by Waterluvian 4y ago
I’m not sure I understand the “this is why” part. Python wants to let you override almost everything. It’s a feature and a powerful and occasionally helpful one. It’s also a feature you never ever have to know about or touch.
- Blackthorn 4y agoIt's like python's metaclasses. You rarely need them but sometimes they really are just the best solution to the problem. Those times, you're really glad they're available.
- jesushax 4y agoThis debate could be summed up as: There's more than one way to do it *vs* there should be one, and preferably only one, obvious way to do it
- DangitBobby 4y ago> there should be one, and preferably only one, obvious way to do it Loops, list/dict comprehensions, if statements, and ternary expressions would all like a word
- jesushax 4y agoThe same debate applies to all of those things, so this is just another instance of Python battling with a philosophical principle underlying the language, which naturally arises anytime a redundant (but good) feature like this is added to the language
- jamesfinlayson 4y agoAgreed - I mostly use Python for small scripts and it makes that use case very easy. I know it has a bunch more features for more niche stuff as well but my throwaway script to download images from a webpage doesn't need pattern matching.
- kazinator 4y ago> It’s also a feature you never ever have to know about or touch. The "never have to know or touch" argument applies only to the lone hacker working on a completely new project with no inherited legacy code.
- zqlark 4y agoIndeed. Most Python code bases I have seen are maxing out all obscure features like those in the article. In practice, Python today is one of the most unreadable languages in existence.