3 ms·
I think something that might help you understand a little better is this: Python includes everything you need to write type hints, but it doesn't include any ty
by chc 4y ago
I think something that might help you understand a little better is this: Python includes everything you need to write type hints, but it doesn't include any type checking functionality. They're making a dynamic language where you can write types if you want, but they don't really do anything. To check your types, you need to use a third-party typechecker like Mypy.
- kungfufrog 4y agoI appreciate your response but I'm actually a pretty experienced Python programmer. I get it conceptually, I've even used it in practice just to get a feel for it, I just found the whole experience _painful_!
- WesolyKubeczek 4y agoThe gods intend that you use those annotations with a checker and some IDE that supports autocompletions and highlighting based on those. They basically lure you into annotating types all over the place so that their products can work better. When you work in an editor that doesn’t support those fancy things, you’ll feel exhausted pretty soon.