4 ms·
Type hints aren't checked or enforced by the compiler. They're really just special-syntax comments to help the developer (or IDE, as the case may be). I wouldn'
by DonaldPShimoda 8y ago
Type hints aren't checked or enforced by the compiler. They're really just special-syntax comments to help the developer (or IDE, as the case may be). I wouldn't call this "type checking".
- Tijdreiziger 8y agoYou can run a type-checking tool (e.g. mypy) which will tell you if you've made any type errors. Since Python has no 'compile' step, type-checking takes the place of compiling in other languages.