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 wrobell
Recipients AlexWaygood, evansd, lukasz.langa, rhettinger, uriyyo, wrobell
Date 2021-12-30.12:55:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1640868943.93.0.941131859284.issue46014@roundup.psfhosted.org>
In-reply-to
Content
Will it support Optional as well?

According to PEP-604, these two shall be equivalent (using Python 3.10 below)?
```
type(int | None)
types.UnionType

type(tp.Optional[int])
typing._UnionGenericAlias
```

Also, IMHO, the documentation of singledispatch should be improved. It needs to state that only Python types are supported with few exceptions (union type now), but other annotation types are not supported, i.e. generics like `list[int]`.
History
Date User Action Args
2021-12-30 12:55:43wrobellsetrecipients: + wrobell, rhettinger, lukasz.langa, uriyyo, AlexWaygood, evansd
2021-12-30 12:55:43wrobellsetmessageid: <1640868943.93.0.941131859284.issue46014@roundup.psfhosted.org>
2021-12-30 12:55:43wrobelllinkissue46014 messages
2021-12-30 12:55:43wrobellcreate