3 ms·
Also: there used to be one and best way to do a thing. Now there's multiple ways to do a half-assed job.
by est 5y ago
Also: there used to be one and best way to do a thing. Now there's multiple ways to do a half-assed job.
- ciupicri 5y agoCould you give some examples?
- mrtranscendence 5y agoThere's always been more than one effective way to do things in Python. The contention otherwise is just some rosy thinking. Heck, decorators were introduced almost 20 years ago and they're basically just additional syntax for def foo(): return "hi" foo = my_decorator(foo) Similarly for context managers and many other features. We can go back much farther than that even: why have lists and tuples, when they're basically interchangeable in most cases? Why have list comprehensions when a loop does the job just fine and might arguably be clearer?