Skip to content

Commit e134a1a

Browse files
gh-152587: Stop documenting bogus default values in tkinter variable methods (GH-152594)
The name parameter of Misc.wait_variable(), setvar() and getvar() and the value parameter of setvar() should not be optional. Their default values ('PY_VAR' and '1') are not meaningful and should not be advertised. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent b19839b commit e134a1a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/library/tkinter.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,11 +1056,11 @@ Base and mixin classes
10561056
:class:`int`.
10571057
Raise :exc:`ValueError` if *s* is not a valid integer.
10581058

1059-
.. method:: getvar(name='PY_VAR')
1059+
.. method:: getvar(name)
10601060

10611061
Return the value of the Tcl global variable named *name*.
10621062

1063-
.. method:: setvar(name='PY_VAR', value='1')
1063+
.. method:: setvar(name, value)
10641064

10651065
Set the Tcl global variable named *name* to *value*.
10661066

@@ -1524,10 +1524,10 @@ Base and mixin classes
15241524
This updates the display of windows, for example after geometry changes,
15251525
but does not process events caused by the user.
15261526

1527-
.. method:: waitvar(name='PY_VAR')
1527+
.. method:: waitvar(name)
15281528
:no-typesetting:
15291529

1530-
.. method:: wait_variable(name='PY_VAR')
1530+
.. method:: wait_variable(name)
15311531

15321532
Wait until the Tcl variable *name* is modified, continuing to process
15331533
events in the meantime so that the application stays responsive.

0 commit comments

Comments
 (0)