mirror of
https://github.com/python/cpython.git
synced 2025-08-28 04:35:02 +00:00
Issue 9732: remove use of __class__ in inspect.getattr_static and note the mro exception to code execution
This commit is contained in:
parent
45ec426157
commit
cc7ebb8f69
3 changed files with 18 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue