Message380562
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. |
|
Date |
User |
Action |
Args |
2020-11-08 22:07:34 | gvanrossum | set | recipients:
+ gvanrossum, levkivskyi, tkomiya |
2020-11-08 22:07:34 | gvanrossum | set | messageid: <1604873254.46.0.367789942688.issue42288@roundup.psfhosted.org> |
2020-11-08 22:07:34 | gvanrossum | link | issue42288 messages |
2020-11-08 22:07:34 | gvanrossum | create | |
|