A proposal for java's "throws" in python: Extend type hints to cover exceptions
A proposal for java's "throws" in python: Extend type hints to cover exceptions
except: or except Exception as e, but finally gave up and gave in to it. The linter wasn’t happy, but fuck it.
It was always quite clear which exceptions I had to catch (or not)
Lol. You’re literally the only one that likes checked exceptions. And, it seems you think that it actually gives you information about what exceptions to catch. It does not. Most things just catch and rethrow as a RuntimException
I also like checked exceptions. I like having a compile time check that I thought through error scenarios.
Is it perfect? No, but it should be iterated upon, not discarded.
FYI, catching and rethrowing as an unchecked exception is a pretty bad anti-patern (and a foul code smell).