News for hackers. Stuff that matters.
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?

There are no comments on this comment yet.