[Python-checkins] cpython (2.7): Issue #24790: Remove extraneous code (which also create 2 & 3 conflicts).

terry.reedy python-checkins at python.org
Tue Aug 18 20:19:14 CEST 2015


https://hg.python.org/cpython/rev/9ad330a9d785
changeset: 97439:9ad330a9d785
branch: 2.7
parent: 97422:d3cda8cf4d42
user: Terry Jan Reedy <tjreedy at udel.edu>
date: Tue Aug 18 13:26:45 2015 -0400
summary:
 Issue #24790: Remove extraneous code (which also create 2 & 3 conflicts).
files:
 Lib/idlelib/StackViewer.py | 10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/Lib/idlelib/StackViewer.py b/Lib/idlelib/StackViewer.py
--- a/Lib/idlelib/StackViewer.py
+++ b/Lib/idlelib/StackViewer.py
@@ -10,8 +10,7 @@
 
 def StackBrowser(root, flist=None, tb=None, top=None):
 if top is None:
- from Tkinter import Toplevel
- top = Toplevel(root)
+ top = tk.Toplevel(root)
 sc = ScrolledCanvas(top, bg="white", highlightthickness=0)
 sc.frame.pack(expand=1, fill="both")
 item = StackTreeItem(flist, tb)
@@ -108,12 +107,9 @@
 def IsExpandable(self):
 return len(self.object) > 0
 
- def keys(self):
- return self.object.keys()
-
 def GetSubList(self):
 sublist = []
- for key in self.keys():
+ for key in self.object.keys():
 try:
 value = self.object[key]
 except KeyError:
@@ -124,7 +120,7 @@
 sublist.append(item)
 return sublist
 
-def _stack_viewer(parent):
+def _stack_viewer(parent): # htest #
 root = tk.Tk()
 root.title("Test StackViewer")
 width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /