Content-Length: 279554 | pFad | https://github.com/python/cpython/issues/103685

0F Tk 8.7: TIP 577 breaks tkinter.Menu.index() · Issue #103685 · python/cpython · GitHub
Skip to content

Tk 8.7: TIP 577 breaks tkinter.Menu.index() #103685

@chrstphrchvz

Description

@chrstphrchvz

Bug report

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.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-tkintertype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/103685

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy