消息 [397466]
>>> 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. |
|
| 日期 |
用户 |
动作 |
参数 |
| 2021-07-14 05:33:24 | serhiy.storchaka | 修改 | recipients:
+ serhiy.storchaka, gvanrossum, kj |
| 2021-07-14 05:33:24 | serhiy.storchaka | 修改 | messageid: <1626240804.32.0.699620622244.issue44632@roundup.psfhosted.org> |
| 2021-07-14 05:33:24 | serhiy.storchaka | 链接 | issue44632 messages |
| 2021-07-14 05:33:24 | serhiy.storchaka | 创建 | |
|