mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
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.
This commit is contained in:
parent
7d722b7d3a
commit
5b88d95cc5
2 changed files with 4 additions and 0 deletions
|
|
@ -1727,6 +1727,9 @@ class Misc:
|
||||||
except (ValueError, TclError):
|
except (ValueError, TclError):
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
if any(isinstance(s, tuple) for s in args):
|
||||||
|
args = [s[0] if isinstance(s, tuple) and len(s) == 1 else s
|
||||||
|
for s in args]
|
||||||
nsign, b, f, h, k, s, t, w, x, y, A, E, K, N, W, T, X, Y, D = args
|
nsign, b, f, h, k, s, t, w, x, y, A, E, K, N, W, T, X, Y, D = args
|
||||||
# Missing: (a, c, d, m, o, v, B, R)
|
# Missing: (a, c, d, m, o, v, B, R)
|
||||||
e = Event()
|
e = Event()
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Fix errors in calling Tkinter bindings on Windows.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue