]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-152587: Stop documenting bogus default values in tkinter variable methods (GH...
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 29 Jun 2026 13:48:10 +0000 (16:48 +0300)
committerGitHub <noreply@github.com>
Mon, 29 Jun 2026 13:48:10 +0000 (16:48 +0300)
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>
Doc/library/tkinter.rst

index cf342d74bc433e5cf1d4e7553b02667df0662f3a..8c4678b4b23c778e9d439a8887f2e23ecd8e3d76 100644 (file)
@@ -1056,11 +1056,11 @@ Base and mixin classes
       :class:`int`.
       Raise :exc:`ValueError` if *s* is not a valid integer.
 
-   .. method:: getvar(name='PY_VAR')
+   .. method:: getvar(name)
 
       Return the value of the Tcl global variable named *name*.
 
-   .. method:: setvar(name='PY_VAR', value='1')
+   .. method:: setvar(name, value)
 
       Set the Tcl global variable named *name* to *value*.
 
@@ -1524,10 +1524,10 @@ Base and mixin classes
       This updates the display of windows, for example after geometry changes,
       but does not process events caused by the user.
 
-   .. method:: waitvar(name='PY_VAR')
+   .. method:: waitvar(name)
       :no-typesetting:
 
-   .. method:: wait_variable(name='PY_VAR')
+   .. method:: wait_variable(name)
 
       Wait until the Tcl variable *name* is modified, continuing to process
       events in the meantime so that the application stays responsive.