wrobell <wrob...@riseup.net> added the comment:

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]`.

----------
nosy: +wrobell

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46014>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to