From 63afc290827663f8df9e0b4a6417aeff712d8f00 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Thu, 18 Jun 2026 16:31:00 +0300 Subject: [PATCH] gh-86726: Fix the documented return type of tkinter info_patchlevel() It returns a sys.version_info-like named tuple, not a string. Co-Authored-By: Claude Opus 4.8 (1M context) --- Doc/library/tkinter.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Doc/library/tkinter.rst b/Doc/library/tkinter.rst index 5c40eadcf49c7c..8507656e50fa33 100644 --- a/Doc/library/tkinter.rst +++ b/Doc/library/tkinter.rst @@ -2333,7 +2333,13 @@ Base and mixin classes .. method:: info_patchlevel() - Return the Tcl/Tk patch level as a string, for example ``'9.1.0'``. + Return the Tcl/Tk patch level as a named tuple with the same five fields + as :data:`sys.version_info`: *major*, *minor*, *micro*, *releaselevel* + and *serial*. + *releaselevel* is ``'alpha'``, ``'beta'`` or ``'final'``. + Converting it to a string gives the version in the usual Tcl/Tk notation, + for example ``'9.0.3'`` for a final release or ``'9.1b2'`` for a + pre-release. .. versionadded:: 3.11