Use a type checker! Pyright can get you like 80% of Rust's type safety.
But not equally flawed.
https://www.lesswrong.com/posts/dLJv2CoRCgeC2mPgj/the-fallac...