3 ms·
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 h
by mckn1ght 2y 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?
- dwattttt 2y agoType 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.