mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-99677: Deduplicate self-type in mro
in inspect._getmembers
(#99678)
Closes #99677
This commit is contained in:
parent
ac115b51e7
commit
2653b82c1a
1 changed files with 1 additions and 1 deletions
|
@ -537,7 +537,7 @@ def _getmembers(object, predicate, getter):
|
|||
processed = set()
|
||||
names = dir(object)
|
||||
if isclass(object):
|
||||
mro = (object,) + getmro(object)
|
||||
mro = getmro(object)
|
||||
# add any DynamicClassAttributes to the list of names if object is a class;
|
||||
# this may result in duplicate entries if, for example, a virtual
|
||||
# attribute with the same name as a DynamicClassAttribute exists
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue