]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #19030: special-cased __dict__ as the actual dict is not returned, a proxy is.
authorEthan Furman <ethan@stoneleaf.us>
Fri, 18 Oct 2013 08:22:08 +0000 (01:22 -0700)
committerEthan Furman <ethan@stoneleaf.us>
Fri, 18 Oct 2013 08:22:08 +0000 (01:22 -0700)
Lib/inspect.py

index 7cd70115c62d6f074f4a333e739f1f8709894569..2e3a670808e66af320bbf96a56fb1142cc249f65 100644 (file)
@@ -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