This is a discussion on Python’s forums about adding something akin to a throws keyword in python.

  • twoframesperminute@mastodon.social
    link
    fedilink
    arrow-up
    0
    ·
    1 year ago

    @sugar_in_your_tea The idea of exceptions is that you can choose when to deal with them. So if you want to deal with them immediately,
    nothing is stopping you.

    If you think handling errors with every function call explicitly is easier, I guess you’re using very few functions. For the project I’m working on, your proposal would probably double the number of lines. Thanks, but no thanks.