June 2019
Beginner to intermediate
770 pages
19h 24m
English
Runtime type validation is rarely a sensible requirement. In a way, this might be a failure to fully understand Python. Python's type system permits numerous extensions. Runtime type checking tends to defeat this. Using mypy provides extensive type checking without the runtime overheads.
The notional objective behind runtime checking is to validate that all of the arguments are of a proper type. The issue with trying to do this is that the definition of proper is often far too narrow to be truly useful.
Type checking is different from checking ranges and domains within a type. Numeric range checking, for example, may be essential to prevent infinite loops at runtime.
What can create problems is ...
Read now
Unlock full access