I am not a Python developer, but I did quite a bit of work in C #, which also did not check for exceptions. He was the Java encoder that he was used to. I personally still think that checked exceptions are a great feature, but opinions vary widely (as you can see in some answers here).
There are many articles on the Internet about why checked exceptions are (and not) a good idea (see this blog post for one such opinion).
But whatever your preference: the rule of thumb in Python and C # is to do what you are already doing β running tests and reading documents.
What I usually did in C # has a catch-all exception handler in the root of my program that allows me to report any error, and the program crashes, and then more deeply in my code has a more specific exception handlers for "known specific errors. " So, in fact, itβs not so different from how you work in Java, just a little more work to figure out where to place your specific handlers.
source share