mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
Issue #25472: In B[<type>], insert B in front of __bases__, to make the __dict__ descriptor work.
This commit is contained in:
parent
6efc7e726f
commit
bb7c57c6cd
2 changed files with 31 additions and 1 deletions
|
@ -981,7 +981,7 @@ class GenericMeta(TypingMeta, abc.ABCMeta):
|
|||
"Cannot substitute %s for %s in %s" %
|
||||
(_type_repr(new), _type_repr(old), self))
|
||||
|
||||
return self.__class__(self.__name__, self.__bases__,
|
||||
return self.__class__(self.__name__, (self,) + self.__bases__,
|
||||
dict(self.__dict__),
|
||||
parameters=params,
|
||||
origin=self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue