https://github.com/python/cpython/commit/ea7f64a65cb52b8b720cbf5d590c2cf89de8d407
commit: ea7f64a65cb52b8b720cbf5d590c2cf89de8d407
branch: main
author: Serhiy Storchaka <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2026-06-27T14:01:34+03:00
summary:

gh-82830: Improve tkinter messagebox docstrings and cursor documentation 
(GH-152380)

Document Windows cursor files (gh-99089).

Co-authored-by: Claude Opus 4.8 <[email protected]>

files:
M Doc/library/tkinter.messagebox.rst
M Doc/library/tkinter.rst
M Lib/tkinter/messagebox.py

diff --git a/Doc/library/tkinter.messagebox.rst 
b/Doc/library/tkinter.messagebox.rst
index b4529e2329ebfb..7fd561ade2f8bc 100644
--- a/Doc/library/tkinter.messagebox.rst
+++ b/Doc/library/tkinter.messagebox.rst
@@ -113,7 +113,7 @@ Common message box styles and layouts include but are not 
limited to:
 .. function:: askretrycancel(title=None, message=None, **options)
 
    Ask if operation should be retried. Shows buttons :data:`RETRY` and 
:data:`CANCEL`.
-   Return ``True`` if the answer is yes and ``False`` otherwise.
+   Return ``True`` if the answer is retry and ``False`` otherwise.
 
 .. function:: askyesno(title=None, message=None, **options)
 
diff --git a/Doc/library/tkinter.rst b/Doc/library/tkinter.rst
index 5fe1ed7474cf36..5c7227a21fc30e 100644
--- a/Doc/library/tkinter.rst
+++ b/Doc/library/tkinter.rst
@@ -770,6 +770,8 @@ cursor
    The standard X cursor names from :file:`cursorfont.h` can be used, without 
the
    ``XC_`` prefix.  For example to get a hand cursor (``XC_hand2``), use the
    string ``"hand2"``.  You can also specify a bitmap and mask file of your 
own.
+   On Windows a cursor file (:file:`.cur` or :file:`.ani`) may be used 
directly,
+   giving its path preceded with an ``@``, as in ``"@C:/cursors/bart.ani"``.
    See page 179 of Ousterhout's book.
 
 distance
diff --git a/Lib/tkinter/messagebox.py b/Lib/tkinter/messagebox.py
index 5f0343b660c68c..dd2816cffb1140 100644
--- a/Lib/tkinter/messagebox.py
+++ b/Lib/tkinter/messagebox.py
@@ -99,24 +99,24 @@ def showerror(title=None, message=None, **options):
 
 
 def askquestion(title=None, message=None, **options):
-    "Ask a question"
+    "Ask a question; return the symbolic name of the selected button"
     return _show(title, message, QUESTION, YESNO, **options)
 
 
 def askokcancel(title=None, message=None, **options):
-    "Ask if operation should proceed; return true if the answer is ok"
+    "Ask if operation should proceed; return True if the answer is ok"
     s = _show(title, message, QUESTION, OKCANCEL, **options)
     return s == OK
 
 
 def askyesno(title=None, message=None, **options):
-    "Ask a question; return true if the answer is yes"
+    "Ask a question; return True if the answer is yes"
     s = _show(title, message, QUESTION, YESNO, **options)
     return s == YES
 
 
 def askyesnocancel(title=None, message=None, **options):
-    "Ask a question; return true if the answer is yes, None if cancelled."
+    "Ask a question; return True if the answer is yes, None if cancelled"
     s = _show(title, message, QUESTION, YESNOCANCEL, **options)
     # s might be a Tcl index object, so convert it to a string
     s = str(s)
@@ -126,7 +126,7 @@ def askyesnocancel(title=None, message=None, **options):
 
 
 def askretrycancel(title=None, message=None, **options):
-    "Ask if operation should be retried; return true if the answer is yes"
+    "Ask if operation should be retried; return True if the answer is retry"
     s = _show(title, message, WARNING, RETRYCANCEL, **options)
     return s == RETRY
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to