跟Union 不同的是,使用TypeVar 声明的函数,多参数类型必须相同,而Union 不做限制。 from typing import TypeVar T = TypeVar("T", str, bytes) def ...
確定! 回上一頁