mirror of https://github.com/python/cpython
gh-99677: Deduplicate self-type in `mro` in `inspect._getmembers` (#99678)
Closes #99677
This commit is contained in:
parent
ac115b51e7
commit
2653b82c1a
|
@ -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…
Reference in New Issue