Message380562
| Author | gvanrossum |
|---|---|
| Recipients | gvanrossum, levkivskyi, tkomiya |
| Date | 2020-11-08.22:07:34 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1604873254.46.0.367789942688.issue42288@roundup.psfhosted.org> |
| In-reply-to |
| Content | |
|---|---|
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. |
|
| History | |||
|---|---|---|---|
| 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 | |