Ivan Levkivskyi added the comment:
OK, let us then keep this issue as a remainder that we need to update the
runtime behaviour when the static one changes.
--
___
Python tracker
Guido van Rossum added the comment:
I'm not sure we should change this ahead of a definitive decision. When you use
mypy with the option that forbids it, your program will be invalid, and it
doesn't really matter what we do at runtime; but that option is not the default
New submission from Ivan Levkivskyi :
Currently this code
def f(x: int = None):
pass
get_type_hints(f)
returns {'x': Optional[int]}. I propose to abandon this behaviour. Although
there is not yet a definitive decision about this aspect of PEP 484, see