Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

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

Closed
Labels
stdlibPython modules in the Lib dirtopic-tkintertype-bugAn unexpected behavior, bug, or error
@chrstphrchvz

Description

@chrstphrchvz

Bug report

One effect ofTIP 577 is that as of Tk 8.7, theindex command for menus will now return an empty string instead ofnone, leading to an error intkinter.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

    stdlibPython modules in the Lib dirtopic-tkintertype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp