HACKER Q&A
📣 gorenb

Is there a way to use Python statically typed or with any type-checking?


I was wondering if python could be used statically typed, or if I could use any type-checking at least. Is there a port of python that's statically typed like TypeScript?


  👤 PaulHoule Accepted Answer ✓

👤 Bostonian
LPython https://lpython.org/ is an alpha-stage "High performance typed Python compiler".

👤 pid-1
- For static type checking, I use Pyright. It's bundled with VS Code's Python extension.

- When I need runtime type checking, I use Pydantic.