DEV Community

Discussion on: Is Python compiled or interpreted?

Collapse
 
michaelcurrin profile image
Michael Currin • Edited

Oh and if you want something like compile time type checks for python, to match C and Java, have a look at Mypy.

From python 3.5 you can use optional type annotations in code and use the mypy command to validate them.

michaelcurrin.github.io/code-cookb...

It is a similar principle to TypeScript adding safety to JS code types. Except here we don't convert
.ts to .js files we just stay on .py files and types get ignored at runtime of your application (ie when MyPy is done running)