Author serhiy.storchaka
Recipients gvanrossum, kj, serhiy.storchaka
Date 2021-07-14.05:33:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1626240804.32.0.699620622244.issue44632@roundup.psfhosted.org>
In-reply-to
Content
>>> 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.
History
Date User Action Args
2021-07-14 05:33:24serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, kj
2021-07-14 05:33:24serhiy.storchakasetmessageid: <1626240804.32.0.699620622244.issue44632@roundup.psfhosted.org>
2021-07-14 05:33:24serhiy.storchakalinkissue44632 messages
2021-07-14 05:33:24serhiy.storchakacreate