diff options
author | Ethan Furman <ethan@stoneleaf.us> | 2013-10-18 08:22:08 (GMT) |
---|---|---|
committer | Ethan Furman <ethan@stoneleaf.us> | 2013-10-18 08:22:08 (GMT) |
commit | a8b0707d91358d23cb9453918477d1d0b1fccd82 (patch) | |
tree | e4484f700cfac27a07704a92b84258a46f73c21b /Lib/inspect.py | |
parent | 2498d9e96834bb21b5c8bb55c81f311a2760ea7a (diff) | |
download | cpython-a8b0707d91358d23cb9453918477d1d0b1fccd82.zip cpython-a8b0707d91358d23cb9453918477d1d0b1fccd82.tar.gz cpython-a8b0707d91358d23cb9453918477d1d0b1fccd82.tar.bz2 |
Issue #19030: special-cased __dict__ as the actual dict is not returned, a proxy is.
Diffstat (limited to 'Lib/inspect.py')
-rw-r--r-- | Lib/inspect.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/inspect.py b/Lib/inspect.py index 7cd7011..2e3a670 100644 --- a/Lib/inspect.py +++ b/Lib/inspect.py @@ -362,6 +362,8 @@ def classify_class_attrs(cls): dict_obj = sentinel if name not in processed: try: + if name == '__dict__': + raise Exception("__dict__ is special, we don't want the proxy") get_obj = getattr(cls, name) except Exception as exc: pass |