laike9m / Python-Type-Challenges

Master Python typing (type hints) with interactive online exercises!
https://python-type-challenges.zeabur.app
MIT License
496 stars 31 forks source link

A problem with the solution to generic2 #124

Closed zrquan closed 2 days ago

zrquan commented 2 days ago

The type can only be str or int (or their subclasses).

按要求可以是 str 或 int 的子类,那应该用 T = TypeVar("T", bound=int|str) 吧?

laike9m commented 2 days ago

感谢指出。这题的描述有问题,or their subclasses 应该去掉