From cd99e79dc74c9d9dea83a5551d657c334b2cc6c9 Mon Sep 17 00:00:00 2001 From: Cheryl Sabella Date: Sat, 23 Sep 2017 16:46:01 -0400 Subject: bpo-31459: Rename IDLE's module browser from Class Browser to Module Browser. (#3704) The original module-level class and method browser became a module browser, with the addition of module-level functions, years ago. Nested classes and functions were added yesterday. For back- compatibility, the virtual event <>, which appears on the Keys tab of the Settings dialog, is not changed. Patch by Cheryl Sabella. --- Lib/idlelib/browser.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Lib/idlelib/browser.py') diff --git a/Lib/idlelib/browser.py b/Lib/idlelib/browser.py index 1fc04d873a..603d299518 100644 --- a/Lib/idlelib/browser.py +++ b/Lib/idlelib/browser.py @@ -1,4 +1,4 @@ -"""Class browser. +"""Module browser. XXX TO DO: @@ -55,7 +55,7 @@ def transform_children(child_dict, modname=None): return sorted(obs, key=lambda o: o.lineno) -class ClassBrowser: +class ModuleBrowser: """Browse module classes and functions in IDLE. """ # This class is the base class for pathbrowser.PathBrowser. @@ -122,8 +122,8 @@ class ClassBrowser: def settitle(self): "Set the window title." - self.top.wm_title("Class Browser - " + self.name) - self.top.wm_iconname("Class Browser") + self.top.wm_title("Module Browser - " + self.name) + self.top.wm_iconname("Module Browser") def rootnode(self): "Return a ModuleBrowserTreeItem as the root of the tree." @@ -226,7 +226,7 @@ class ChildBrowserTreeItem(TreeItem): pass -def _class_browser(parent): # htest # +def _module_browser(parent): # htest # try: file = sys.argv[1] # If pass file on command line # If this succeeds, unittest will fail. @@ -242,10 +242,10 @@ def _class_browser(parent): # htest # flist = pyshell.PyShellFileList(parent) global file_open file_open = flist.open - ClassBrowser(flist, name, [dir], _htest=True) + ModuleBrowser(flist, name, [dir], _htest=True) if __name__ == "__main__": from unittest import main main('idlelib.idle_test.test_browser', verbosity=2, exit=False) from idlelib.idle_test.htest import run - run(_class_browser) + run(_module_browser) -- cgit v1.2.1