▲ | ac130kz 4 days ago | |
Somewhat solved by type annotations + a good static type checker, such as pyright (it's 2025, there must be type annotations everywhere), and dynamic cases (very rare, probably due to poor or unfortunate design decisions) can be solved with validators, e.g. the aforementioned Pydantic. This isn't a silver bullet, but it works really well. | ||
▲ | codethief 4 days ago | parent [-] | |
Yeah, exactly. There isn't a single good reason not to use type annnotations in Python these days. Yes, they might not be as powerful as TypeScript's type language yet, but they are getting there. |