Issue 9732: remove use of __class__ in inspect.getattr_static and note the mro exception to code execution

This commit is contained in:
Michael Foord 2010-11-20 16:20:16 +00:00
parent 45ec426157
commit cc7ebb8f69
3 changed files with 18 additions and 4 deletions

View file

@ -1092,7 +1092,7 @@ def getattr_static(obj, attr, default=_sentinel):
instance_result = _sentinel
if not isinstance(obj, type):
instance_result = _check_instance(obj, attr)
klass = obj.__class__
klass = type(obj)
else:
klass = obj