Hacker News new | ask | show | jobs
by toolslive 425 days ago
I was merely giving an example that strong typing has nothing to do with having to write the types. (and, obviously, the inferred type (int -> int) is correct. )
2 comments

Only if reveal_type only accepts an int. Just because the default value of i is 0 doesn't mean anything about what could be passed in.
not my fault python is broken.
> and, obviously, the inferred type (int -> int) is correct.

No it’s not. It’s Optional[int] -> int at minimum. There are other completely valid signatures beyond that too.