+-- StopIteration
+-- StopAsyncIterat
which are used for mere communication rather than describing real error cases.Also, you should exclude:
+-- SystemExit
+-- KeyboardInterrupt
+-- GeneratorExit
+-- ImportError
+-- MemoryError
+-- SyntaxError
| +-- IndentationError
| +-- TabError
because unit tests won't help you to catch these, either (because they are either thrown directly on program start, or depend of specific system circumstances rather than bugs in your code).Finally, I would argue that most instances of this exception are caught by a type system:
| +-- KeyError
Why? Because most of the time the key is not user input, but a hard coded string, and accessing non-existing properties of an object/struct is caught by most type systems on compile time.