Skip to content

Commit 696f1d0

Browse files
committed
Adjust internals of inspect.getattr_static
1 parent 9ef8632 commit 696f1d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/inspect.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1698,7 +1698,8 @@ def _shadowed_dict_from_weakref_mro_tuple(*weakref_mro):
16981698
class_dict = dunder_dict['__dict__']
16991699
if not (type(class_dict) is types.GetSetDescriptorType and
17001700
class_dict.__name__ == "__dict__" and
1701-
class_dict.__objclass__ is entry):
1701+
(class_dict.__objclass__ is object or
1702+
class_dict.__objclass__ is entry)):
17021703
return class_dict
17031704
return _sentinel
17041705

0 commit comments

Comments
 (0)