▲ | hmry 5 days ago | |||||||
Agreed about TS, but Python type annotations are not ignored. They are executed as code (all type annotations are valid expressions) and the results are stored on the module/class/function object that contains the annotated variable | ||||||||
▲ | nine_k 4 days ago | parent [-] | |||||||
Python type annotations get turned into metadata which other tools may inspect at runtime, but the Python runtime itself does nothing with it. It's just well-structured comments. In Python basically everything is executable, and so are type annotations. | ||||||||
|