summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
authorNikita Sobolev <mail@sobolevn.me>2022-11-27 11:15:26 (GMT)
committerGitHub <noreply@github.com>2022-11-27 11:15:26 (GMT)
commit2653b82c1a44371ad0da6b5a1101abbda4acd2d3 (patch)
tree9ebcde53cc1f6234f082c978de72f670593f37ea /Lib/inspect.py
parentac115b51e71c24374682e2a9e6663f99d2faf000 (diff)
downloadcpython-2653b82c1a44371ad0da6b5a1101abbda4acd2d3.zip
cpython-2653b82c1a44371ad0da6b5a1101abbda4acd2d3.tar.gz
cpython-2653b82c1a44371ad0da6b5a1101abbda4acd2d3.tar.bz2
gh-99677: Deduplicate self-type in `mro` in `inspect._getmembers` (#99678)
Closes #99677
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index a896fcd..31ac888 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -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