diff --git a/Lib/idlelib/News3.txt b/Lib/idlelib/News3.txt index 30784578cc637f..8b979158204af9 100644 --- a/Lib/idlelib/News3.txt +++ b/Lib/idlelib/News3.txt @@ -1,3 +1,13 @@ +What's New in IDLE 3.15.0 +(since 3.14.0) +Released on 2026-10-01 +========================= + + +gh-134873: Minor code modernization in extension loader. +Patch by johnzhou721, Zachary Ware, and Terry J. Reedy. + + What's New in IDLE 3.14.0 (since 3.13.0) Released on 2025-10-07 diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index 83112d85575e47..af4bba7891b00c 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -1169,12 +1169,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))