Hacker News new | ask | show | jobs
by mckn1ght 544 days ago
I haven’t used type hints in Python, but can what you’re describing lead to situations where the code cannot run and the interpreter gives you a suggestion on how to fix it?
1 comments

Type hints have no runtime impact, so they can't make stuff not work.

Type linters like mypy can check your code & report something like "this function call requires str, you're providing str | None" though.