Re:Upcoming Python features brought to you by Python Enhance...
by est on Monday February 14, 2022 @09:47AM
(#30332598)
Also: there used to be one and best way to do a thing. Now there's multiple ways to do a half-assed job.
[ Parent
| on HN ]
Re:Upcoming Python features brought to you by Python Enhance...
by mrtranscendence on Monday February 14, 2022 @10:23AM
(#30333073)
There'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?