Guido van Rossum <[email protected]> added the comment:
There is actually a difference between Any and Optional[Any]. Try the following
using e.g. mypy:
def f(a: Optional[Any]):
a+1
def g(a: Any):
a+1
You'll get an error in f but not in g.
So this behavior is not a bug.
----------
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue42288>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com