You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tk 8.7: TIP 577 breaks tkinter.Menu.index() #103685
One effect of TIP 577 is that as of Tk 8.7, the index command for menus will now return an empty string instead of none, leading to an error in tkinter.Menu.index():
>>> m.index('none')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/user/git/cpython/Lib/tkinter/__init__.py", line 3434, in index
return self.tk.getint(i)
^^^^^^^^^^^^^^^^^
_tkinter.TclError: expected integer but got ""
It should be easy to accommodate both the new and old behavior.
Activity
pythongh-103685: Fix tkinter.Menu.index() for Tk 8.7
gh-103685: Fix tkinter.Menu.index() for Tk 8.7 (#103686)
pythongh-103685: Fix tkinter.Menu.index() for Tk 8.7 (pythonGH-103686)
[3.11] gh-103685: Fix tkinter.Menu.index() for Tk 8.7 (GH-103686) (#1…
terryjreedy commentedon Apr 24, 2023
Thanks for making a start on preparing for 8.7+ & 9.0+