Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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?


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: