Neither does typescript. All the types are removed at runtime, it's up to you to ensure that your build process and tooling correctly validates the types. The same is true for python, and the ecosystem has really great tools for doing this.
Use pydandic for serde/IO validation, and mypy --strict. And minimize cheating e.g. Any. I think you'll find it extremely stable and a totally different beast than usual python.
joshuamorton|3 years ago
isoprophlex|3 years ago
kortex|3 years ago
LtWorf|3 years ago
Pydantic requires inheritance and requires a modified mypy because it uses types its own way rather than the python way.
Oh, typedload is faster than pydantic, despite being pure python instead of an .so file.