Earlier quoted context omitted.
> In what reasonable sense can Python be said to "enforce types at runtime" here? In [1]: foo: int = 'hello' In [2]: foo + 1 TypeError Input In [2], in () ----> 1 foo + 1 TypeError: can only concatenate str (not "int") to str
This is a demonstration that it has not enforced what many would reasonably believe is a static type declaration. But we have (to quote another commenter) "uneducated" people making a supposedly boneheaded mistake to assume x: T = y is a declaration that x will only contain values of type T, or otherwise something will be detected by cpython as invalid (at either bytecode-compile-time or run-time). Instead, this line…
Absent of active machine checking (e.g., via mypy), type hints should be considered exactly what you said: another form of documentation, one that might just be wrong.