Message397466
>>> import typing
>>> int | typing.T
int | ~T
>>> typing.T | int
typing.Union[~T, int]
>>> T2 = TypeVar('T2')
>>> int | T2
typing.Union[int, ~T2]
>>> T2 | int
typing.Union[~T2, int]
There is a support of TypeVar in type.__or__, but it does not work with user defined TypeVars, only with internal TypeVars defined in the typing module. |
|
| Date |
User |
Action |
Args |
| 2021-07-14 05:33:24 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum, kj |
| 2021-07-14 05:33:24 | serhiy.storchaka | set | messageid: <1626240804.32.0.699620622244.issue44632@roundup.psfhosted.org> |
| 2021-07-14 05:33:24 | serhiy.storchaka | link | issue44632 messages |
| 2021-07-14 05:33:24 | serhiy.storchaka | create | |
|