Message409369
```
>>> from typing import Optional, get_origin
>>> get_origin(Optional[int])
typing.Union
```
^Because of that, it will work with typing.Optional as well as typing.Union and types.UnionType, yes.
I am planning on submitting a docs PR at some point in the next few days (probably linked to a new BPO issue). |
|
Date |
User |
Action |
Args |
2021-12-30 13:42:12 | AlexWaygood | set | recipients:
+ AlexWaygood, rhettinger, wrobell, lukasz.langa, uriyyo, evansd |
2021-12-30 13:42:12 | AlexWaygood | set | messageid: <1640871732.05.0.682238650609.issue46014@roundup.psfhosted.org> |
2021-12-30 13:42:12 | AlexWaygood | link | issue46014 messages |
2021-12-30 13:42:12 | AlexWaygood | create | |
|