Skip to content

Commit aae671d

Browse files
[3.13] gh-86726: Fix the documented return type of tkinter info_patchlevel() (GH-151655) (GH-151660)
It returns a sys.version_info-like named tuple, not a string. (cherry picked from commit 3cd02a1) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 33b9f75 commit aae671d

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Doc/library/tkinter.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2299,7 +2299,13 @@ Base and mixin classes
22992299

23002300
.. method:: info_patchlevel()
23012301

2302-
Return the Tcl/Tk patch level as a string, for example ``'8.6.15'``.
2302+
Return the Tcl/Tk patch level as a named tuple with the same five fields
2303+
as :data:`sys.version_info`: *major*, *minor*, *micro*, *releaselevel*
2304+
and *serial*.
2305+
*releaselevel* is ``'alpha'``, ``'beta'`` or ``'final'``.
2306+
Converting it to a string gives the version in the usual Tcl/Tk notation,
2307+
for example ``'9.0.3'`` for a final release or ``'9.1b2'`` for a
2308+
pre-release.
23032309

23042310
.. versionadded:: 3.11
23052311

0 commit comments

Comments
 (0)