[Python-checkins] cpython: Issue #19030: special-cased __dict__ as the actual dict is not returned, a
ethan.furman
python-checkins at python.org
Fri Oct 18 10:22:14 CEST 2013
http://hg.python.org/cpython/rev/02c9d26d231f
changeset: 86421:02c9d26d231f
user: Ethan Furman <ethan at stoneleaf.us>
date: Fri Oct 18 01:22:08 2013 -0700
summary:
Issue #19030: special-cased __dict__ as the actual dict is not returned, a proxy is.
files:
Lib/inspect.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Lib/inspect.py b/Lib/inspect.py
--- a/Lib/inspect.py
+++ b/Lib/inspect.py
@@ -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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list