Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5b88d95

Browse filesBrowse files
gh-118760: Fix errors in calling Tkinter bindings on Windows (GH-118782)
For unknown reasons some arguments for Tkinter binding can be created as a 1-tuple containing a Tcl_Obj when wantobjects is 2.
1 parent 7d722b7 commit 5b88d95
Copy full SHA for 5b88d95

File tree

2 files changed

+4
-0
lines changed
Filter options

2 files changed

+4
-0
lines changed

‎Lib/tkinter/__init__.py

Copy file name to clipboardExpand all lines: Lib/tkinter/__init__.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,6 +1727,9 @@ def getint_event(s):
17271727
except (ValueError, TclError):
17281728
return s
17291729

1730+
if any(isinstance(s, tuple) for s in args):
1731+
args = [s[0] if isinstance(s, tuple) and len(s) == 1 else s
1732+
for s in args]
17301733
nsign, b, f, h, k, s, t, w, x, y, A, E, K, N, W, T, X, Y, D = args
17311734
# Missing: (a, c, d, m, o, v, B, R)
17321735
e = Event()
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix errors in calling Tkinter bindings on Windows.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.