This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author AlexWaygood
Recipients AlexWaygood, evansd, lukasz.langa, rhettinger, uriyyo, wrobell
Date 2021-12-30.13:42:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1640871732.05.0.682238650609.issue46014@roundup.psfhosted.org>
In-reply-to
Content
```
>>> 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).
History
Date User Action Args
2021-12-30 13:42:12AlexWaygoodsetrecipients: + AlexWaygood, rhettinger, wrobell, lukasz.langa, uriyyo, evansd
2021-12-30 13:42:12AlexWaygoodsetmessageid: <1640871732.05.0.682238650609.issue46014@roundup.psfhosted.org>
2021-12-30 13:42:12AlexWaygoodlinkissue46014 messages
2021-12-30 13:42:12AlexWaygoodcreate