April 6, 2023

If you see a count: int, what kind of guarantee do you have that the count name is actually bound to an int object at runtime? — The different uses of Python type hints

No guarantee at all since Python’s type hints do not enforce type safety: “The Python runtime does not enforce function and variable type annotations.” However, the author makes a good point in exposing the different use cases of type hinting.