Writing Python like it's Rust
Lots of comments here are stating that typing is half baked in Python, and that if you gotta use types, you should use another language.But that's missing the point that Python is still not meant to be the best at anything, but good at most things.And in this case, it's exactly what you get: optional typing, with decent safety if you need it.You can quick script or design seriously, you can explore in a shell or commit a public API into a file, you can start with untyped code and add some later.That makes it cumbersome sometimes, yes. mypy is slow, and the typing system + match / case have many rough edges.But it also keeps Python incredibly versatile.It's amazing what you can do with this (not so) little language, and the whole ecosystem is always getting better and better.Every time I try another language, I keep getting back into Python, because the fields I need tools for are vast, and it's the only one that I'm pretty sure will handle a problem decently in all it's various forms, especially the one I didn't consider when I started.There is immense value in this, because it keeps opportunities on the table no matter what you do. I often find my self during a project adding something I could only because Python let me do so easily.Python is quirky, yet it still damn practical.