Skip to content

Commit 65e8708

Browse files
authored
pythongh-103685: Fix tkinter.Menu.index() for Tk 8.7
1 parent caed494 commit 65e8708

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/tkinter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3430,7 +3430,7 @@ def entryconfigure(self, index, cnf=None, **kw):
34303430
def index(self, index):
34313431
"""Return the index of a menu item identified by INDEX."""
34323432
i = self.tk.call(self._w, 'index', index)
3433-
if i == 'none': return None
3433+
if i in ('', 'none'): return None
34343434
return self.tk.getint(i)
34353435

34363436
def invoke(self, index):

0 commit comments

Comments
 (0)