summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/browser.py
diff options
context:
space:
mode:
authorCheryl Sabella <cheryl.sabella@gmail.com>2017-09-23 20:46:01 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2017-09-23 20:46:01 (GMT)
commitcd99e79dc74c9d9dea83a5551d657c334b2cc6c9 (patch)
tree23aa523413523630c5676cf732476dc7e8dd47fd /Lib/idlelib/browser.py
parent99167f85b7373c8082b30a74211f009627bdedfa (diff)
downloadcpython-cd99e79dc74c9d9dea83a5551d657c334b2cc6c9.zip
cpython-cd99e79dc74c9d9dea83a5551d657c334b2cc6c9.tar.gz
cpython-cd99e79dc74c9d9dea83a5551d657c334b2cc6c9.tar.bz2
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 <<open-class-browser>>, which appears on the Keys tab of the Settings dialog, is not changed. Patch by Cheryl Sabella.
Diffstat (limited to 'Lib/idlelib/browser.py')
-rw-r--r--Lib/idlelib/browser.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/idlelib/browser.py b/Lib/idlelib/browser.py
index 1fc04d8..603d299 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)