Skip to content

Commit b70aac6

Browse files
committed
feat: Add default values to the parameters of the widget tkinter.OptionMenu
1 parent 5ec4bf8 commit b70aac6

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
@@ -4180,7 +4180,7 @@ def __call__(self, *args):
41804180
class OptionMenu(Menubutton):
41814181
"""OptionMenu which allows the user to select a value from a menu."""
41824182

4183-
def __init__(self, master, variable, value, *values, **kwargs):
4183+
def __init__(self, master=None, variable="", value="", *values, **kwargs):
41844184
"""Construct an optionmenu widget with the parent MASTER, with
41854185
the resource textvariable set to VARIABLE, the initially selected
41864186
value VALUE, the other menu values VALUES and an additional

0 commit comments

Comments
 (0)