[Python-checkins] cpython (merge 3.2 -> default): merge 3.2

martin.v.loewis python-checkins at python.org
Wed Jul 11 08:49:37 CEST 2012


http://hg.python.org/cpython/rev/76b7b74c42bb
changeset:   78057:76b7b74c42bb
parent:      78054:6d4fab44fce2
parent:      78056:ff2a5f4bacd5
user:        Martin v. Löwis <martin at v.loewis.de>
date:        Wed Jul 11 08:49:24 2012 +0200
summary:
  merge 3.2

files:
  Lib/idlelib/run.py |  10 ++++++++--
  1 files changed, 8 insertions(+), 2 deletions(-)


diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -260,12 +260,18 @@
 
 class _RPCFile(io.TextIOBase):
     """Wrapper class for the RPC proxy to typecheck arguments
-    that may not support pickling."""
+    that may not support pickling. The base class is there only
+    to support type tests; all implementations come from the remote
+    object."""
 
     def __init__(self, rpc):
         super.__setattr__(self, 'rpc', rpc)
 
-    def __getattr__(self, name):
+    def __getattribute__(self, name):
+        # When accessing the 'rpc' attribute, use ours
+        if name == 'rpc':
+            return io.TextIOBase.__getattribute__(self, name)
+        # Else only look into the remote object only
         return getattr(self.rpc, name)
 
     def __setattr__(self, name, value):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list