(original) (raw)

changeset: 86421:02c9d26d231f user: Ethan Furman ethan@stoneleaf.us date: Fri Oct 18 01:22:08 2013 -0700 files: Lib/inspect.py description: Issue #19030: special-cased __dict__ as the actual dict is not returned, a proxy is. diff -r d103ba56710e -r 02c9d26d231f Lib/inspect.py --- a/Lib/inspect.py Fri Oct 18 00:45:40 2013 -0700 +++ b/Lib/inspect.py Fri Oct 18 01:22:08 2013 -0700 @@ -362,6 +362,8 @@ 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 /ethan@stoneleaf.us