summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r--Lib/inspect.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py
index 8b800f4..fc9f612 100644
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -1186,10 +1186,11 @@ def getattr_static(obj, attr, default=_sentinel):
if obj is klass:
# for types we check the metaclass too
for entry in _static_getmro(type(klass)):
- try:
- return entry.__dict__[attr]
- except KeyError:
- pass
+ if _shadowed_dict(type(entry)) is _sentinel:
+ try:
+ return entry.__dict__[attr]
+ except KeyError:
+ pass
if default is not _sentinel:
return default
raise AttributeError(attr)