Y
Hacker News
new
|
ask
|
show
|
jobs
by
dgrunwald
93 days ago
But in Python the type checker does not complain about `x: float = 0`, because for the purpose of type checking (but not at runtime), `int` is considered a subtype of `float`:
https://typing.python.org/en/latest/spec/special-types.html#...