diff options
author | Cheryl Sabella <cheryl.sabella@gmail.com> | 2017-09-23 16:46:01 -0400 |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2017-09-23 16:46:01 -0400 |
commit | cd99e79dc74c9d9dea83a5551d657c334b2cc6c9 (patch) | |
tree | 23aa523413523630c5676cf732476dc7e8dd47fd /Lib/idlelib/editor.py | |
parent | 99167f85b7373c8082b30a74211f009627bdedfa (diff) | |
download | cpython-git-cd99e79dc74c9d9dea83a5551d657c334b2cc6c9.tar.gz |
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/editor.py')
-rw-r--r-- | Lib/idlelib/editor.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index 855d375055..5b16ccee8a 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -190,7 +190,7 @@ class EditorWindow(object): flist.dict[key] = self text.bind("<<open-new-window>>", self.new_callback) text.bind("<<close-all-windows>>", self.flist.close_all_callback) - text.bind("<<open-class-browser>>", self.open_class_browser) + text.bind("<<open-class-browser>>", self.open_module_browser) text.bind("<<open-path-browser>>", self.open_path_browser) text.bind("<<open-turtle-demo>>", self.open_turtle_demo) @@ -632,10 +632,10 @@ class EditorWindow(object): def open_module(self): """Get module name from user and open it. - Return module path or None for calls by open_class_browser + Return module path or None for calls by open_module_browser when latter is not invoked in named editor window. """ - # XXX This, open_class_browser, and open_path_browser + # XXX This, open_module_browser, and open_path_browser # would fit better in iomenu.IOBinding. try: name = self.text.get("sel.first", "sel.last").strip() @@ -657,7 +657,7 @@ class EditorWindow(object): self.open_module() return "break" - def open_class_browser(self, event=None): + def open_module_browser(self, event=None): filename = self.io.filename if not (self.__class__.__name__ == 'PyShellEditorWindow' and filename): @@ -667,7 +667,7 @@ class EditorWindow(object): head, tail = os.path.split(filename) base, ext = os.path.splitext(tail) from idlelib import browser - browser.ClassBrowser(self.flist, base, [head]) + browser.ModuleBrowser(self.flist, base, [head]) return "break" def open_path_browser(self, event=None): |