Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
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 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue40296> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com