10 karma · joined January 24, 2017
But for larger projects type checking is valuable. Types introduce additional contracts between components to manage and control the overall complexity of the system.
For small scripts and self contained applications I regard type checking as a burden. For larger projects not.
Pylint is a valuable tool to detect typical errors but does not check types. Regard a function which returns the sum of two given arguments. It will work with both arguments being integers and for both being strings. PyLint will not complain here, but if your code uses this result you might trigger errors much later during progam execution which are hard to detect or understand without type checking.
Another strategy is to catch the "expected" exceptions first followed by a general exception handler. This can use the `traceback` module to log the call chain and error message.