]> granicus.if.org Git - python/commitdiff
Fix remaining map() issues.
authorKurt B. Kaiser <kbk@shore.net>
Thu, 9 Aug 2007 18:00:23 +0000 (18:00 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Thu, 9 Aug 2007 18:00:23 +0000 (18:00 +0000)
M    idlelib/PyShell.py
M    idlelib/EditorWindow.py
M    idlelib/rpc.py
M    idlelib/OutputWindow.py
M    idlelib/RemoteObjectBrowser.py

Lib/idlelib/EditorWindow.py
Lib/idlelib/OutputWindow.py
Lib/idlelib/PyShell.py
Lib/idlelib/RemoteObjectBrowser.py
Lib/idlelib/rpc.py

index a43929dea6c48a132c470d04f5bc5014e5614db6..27ff6e1caf6101353224129a02e8773631cbe4f0 100644 (file)
@@ -817,8 +817,7 @@ class EditorWindow(object):
         "Return (width, height, x, y)"
         geom = self.top.wm_geometry()
         m = re.match(r"(\d+)x(\d+)\+(-?\d+)\+(-?\d+)", geom)
-        tuple = (map(int, m.groups()))
-        return tuple
+        return list(map(int, m.groups()))
 
     def close_event(self, event):
         self.close()
index 7991e1836c30610d90d5b091b754ec67ad8a9188..ef155a442e0f293e7dc4e0bae41173f29b420e76 100644 (file)
@@ -47,8 +47,9 @@ class OutputWindow(EditorWindow):
         self.text.see(mark)
         self.text.update()
 
-    def writelines(self, l):
-        map(self.write, l)
+    def writelines(self, lines):
+        for line in lines:
+            self.write(line)
 
     def flush(self):
         pass
index 70c36fc8a43ae8d3ba5446975445b120ffa7dbca..f8c73ee4fc569a54a4b00ffa98aab762eac94017 100644 (file)
@@ -1227,8 +1227,9 @@ class PseudoFile(object):
     def write(self, s):
         self.shell.write(s, self.tags)
 
-    def writelines(self, l):
-        map(self.write, l)
+    def writelines(self, lines):
+        for line in lines:
+            self.write(line)
 
     def flush(self):
         pass
index bcb9a2e0e40e3f16fdf568ef5f3bcb3a9461c74e..bf1fb3bf2ad113636270893a0a52f39f210b29c5 100644 (file)
@@ -18,7 +18,7 @@ class WrappedObjectTreeItem:
 
     def _GetSubList(self):
         list = self.__item._GetSubList()
-        return map(remote_object_tree_item, list)
+        return list(map(remote_object_tree_item, list))
 
 class StubObjectTreeItem:
     # Lives in IDLE process
index 2f3b56dd449b8c8c6c6af675be032e885bf71383..037f8b72130aee06bd0f2fc0486b165d88c8fb56 100644 (file)
@@ -288,7 +288,7 @@ class SocketIO(object):
         if isinstance(obj, RemoteProxy):
             return RPCProxy(self, obj.oid)
         if isinstance(obj, list):
-            return map(self._proxify, obj)
+            return list(map(self._proxify, obj))
         # XXX Check for other types -- not currently needed
         return obj