https://github.com/python/cpython/commit/92cab34781ac0fa76a04370b95c2d4b12ce6b672 commit: 92cab34781ac0fa76a04370b95c2d4b12ce6b672 branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: zware <[email protected]> date: 2026-09-03T21:36:20Z summary:
[3.14] gh-136061: Simplify idlelib.editor.EditorWindow.load_extension methodname processing (GH-156912) (cherry picked from commit 0625799652a4876171103e985057ee3546441d95) Co-authored-by: John <[email protected]> files: M Lib/idlelib/editor.py diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index a040d791bdeb528..89e1725e15f30b0 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -1175,12 +1175,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)) _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
