mirror of https://github.com/python/cpython
Fix remaining map() issues.
M idlelib/PyShell.py M idlelib/EditorWindow.py M idlelib/rpc.py M idlelib/OutputWindow.py M idlelib/RemoteObjectBrowser.py
This commit is contained in:
parent
60455b22de
commit
66aaf74e52
|
@ -817,8 +817,7 @@ class EditorWindow(object):
|
||||||
"Return (width, height, x, y)"
|
"Return (width, height, x, y)"
|
||||||
geom = self.top.wm_geometry()
|
geom = self.top.wm_geometry()
|
||||||
m = re.match(r"(\d+)x(\d+)\+(-?\d+)\+(-?\d+)", geom)
|
m = re.match(r"(\d+)x(\d+)\+(-?\d+)\+(-?\d+)", geom)
|
||||||
tuple = (map(int, m.groups()))
|
return list(map(int, m.groups()))
|
||||||
return tuple
|
|
||||||
|
|
||||||
def close_event(self, event):
|
def close_event(self, event):
|
||||||
self.close()
|
self.close()
|
||||||
|
|
|
@ -47,8 +47,9 @@ class OutputWindow(EditorWindow):
|
||||||
self.text.see(mark)
|
self.text.see(mark)
|
||||||
self.text.update()
|
self.text.update()
|
||||||
|
|
||||||
def writelines(self, l):
|
def writelines(self, lines):
|
||||||
map(self.write, l)
|
for line in lines:
|
||||||
|
self.write(line)
|
||||||
|
|
||||||
def flush(self):
|
def flush(self):
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -1227,8 +1227,9 @@ class PseudoFile(object):
|
||||||
def write(self, s):
|
def write(self, s):
|
||||||
self.shell.write(s, self.tags)
|
self.shell.write(s, self.tags)
|
||||||
|
|
||||||
def writelines(self, l):
|
def writelines(self, lines):
|
||||||
map(self.write, l)
|
for line in lines:
|
||||||
|
self.write(line)
|
||||||
|
|
||||||
def flush(self):
|
def flush(self):
|
||||||
pass
|
pass
|
||||||
|
|
|
@ -18,7 +18,7 @@ class WrappedObjectTreeItem:
|
||||||
|
|
||||||
def _GetSubList(self):
|
def _GetSubList(self):
|
||||||
list = self.__item._GetSubList()
|
list = self.__item._GetSubList()
|
||||||
return map(remote_object_tree_item, list)
|
return list(map(remote_object_tree_item, list))
|
||||||
|
|
||||||
class StubObjectTreeItem:
|
class StubObjectTreeItem:
|
||||||
# Lives in IDLE process
|
# Lives in IDLE process
|
||||||
|
|
|
@ -288,7 +288,7 @@ class SocketIO(object):
|
||||||
if isinstance(obj, RemoteProxy):
|
if isinstance(obj, RemoteProxy):
|
||||||
return RPCProxy(self, obj.oid)
|
return RPCProxy(self, obj.oid)
|
||||||
if isinstance(obj, list):
|
if isinstance(obj, list):
|
||||||
return map(self._proxify, obj)
|
return list(map(self._proxify, obj))
|
||||||
# XXX Check for other types -- not currently needed
|
# XXX Check for other types -- not currently needed
|
||||||
return obj
|
return obj
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue