This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients gvanrossum, serhiy.storchaka
Date 2020-04-16.08:14:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587024880.76.0.23757492688.issue40296@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-04-16 08:14:40serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum
2020-04-16 08:14:40serhiy.storchakasetmessageid: <1587024880.76.0.23757492688.issue40296@roundup.psfhosted.org>
2020-04-16 08:14:40serhiy.storchakalinkissue40296 messages
2020-04-16 08:14:40serhiy.storchakacreate