diff --git a/Lib/idlelib/News3.txt b/Lib/idlelib/News3.txt index 30784578cc637f..6cb66605e78726 100644 --- a/Lib/idlelib/News3.txt +++ b/Lib/idlelib/News3.txt @@ -4,6 +4,9 @@ Released on 2025-10-07 ========================= +gh-134873: Minor code modernization in extension loader. +Patch by johnzhou721, Zachary Ware, and Terry J. Reedy. + gh-112936: IDLE - Include Shell menu in single-process mode, though with Restart Shell and View Last Restart disabled. Patch by Zhikang Yan. diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index 17b498f63ba43b..29aea3417cee9e 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -1202,12 +1202,7 @@ def load_extension(self, name): if keydefs: self.apply_bindings(keydefs) for vevent in keydefs: - methodname = vevent.replace("-", "_") - while methodname[:1] == '<': - methodname = methodname[1:] - while methodname[-1:] == '>': - methodname = methodname[:-1] - methodname = methodname + "_event" + methodname = vevent.strip("<>").replace("-", "_") + "_event" if hasattr(ins, methodname): self.text.bind(vevent, getattr(ins, methodname)) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy