mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
list[int].__class__ returned type, and isinstance(list[int], type) returned True. It caused numerous problems in code that checks isinstance(x, type).
2 lines
147 B
ReStructuredText
2 lines
147 B
ReStructuredText
:class:`types.GenericAlias` no longer relays the ``__class__`` attribute.
|
|
For example, ``isinstance(list[int], type)`` no longer returns ``True``.
|