Closed zrquan closed 2 days ago
The type can only be str or int (or their subclasses).
按要求可以是 str 或 int 的子类,那应该用 T = TypeVar("T", bound=int|str) 吧?
T = TypeVar("T", bound=int|str)
感谢指出。这题的描述有问题,or their subclasses 应该去掉
or their subclasses
按要求可以是 str 或 int 的子类,那应该用
T = TypeVar("T", bound=int|str)
吧?