Message366581
The problem is that isinstance(list[int], type) returns True, but list[int] is not actually an instance of type.
>>> isinstance(list[int], type)
True
>>> issubclass(type(list[int]), type)
False
>>> type.__subclasses__(list[int])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: descriptor '__subclasses__' for 'type' objects doesn't apply to a 'types.GenericAlias' object |
|
Date |
User |
Action |
Args |
2020-04-16 08:14:40 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, gvanrossum |
2020-04-16 08:14:40 | serhiy.storchaka | set | messageid: <1587024880.76.0.23757492688.issue40296@roundup.psfhosted.org> |
2020-04-16 08:14:40 | serhiy.storchaka | link | issue40296 messages |
2020-04-16 08:14:40 | serhiy.storchaka | create | |
|