3 ms·
A type checker doesn't make a statically typed language. Also, yes, the program will "run" with failed type assertions. Compare this with Typescript, where by
by bayesian_horse 5y ago
A type checker doesn't make a statically typed language. Also, yes, the program will "run" with failed type assertions.
Compare this with Typescript, where by default the compiler will refuse to compile the code when type errors are encountered. But there are other Typescript compilers that are faster and don't typecheck at all, they just strip the syntax.
If you want the strict behavior, you need to prevent the program from running when typechecking fails. That is entirely possible with mypy.