Skip to content

Commit ea7f64a

Browse files
gh-82830: Improve tkinter messagebox docstrings and cursor documentation (GH-152380)
Document Windows cursor files (gh-99089). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 93454fe commit ea7f64a

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

Doc/library/tkinter.messagebox.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Common message box styles and layouts include but are not limited to:
113113
.. function:: askretrycancel(title=None, message=None, **options)
114114

115115
Ask if operation should be retried. Shows buttons :data:`RETRY` and :data:`CANCEL`.
116-
Return ``True`` if the answer is yes and ``False`` otherwise.
116+
Return ``True`` if the answer is retry and ``False`` otherwise.
117117

118118
.. function:: askyesno(title=None, message=None, **options)
119119

Doc/library/tkinter.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,8 @@ cursor
770770
The standard X cursor names from :file:`cursorfont.h` can be used, without the
771771
``XC_`` prefix. For example to get a hand cursor (``XC_hand2``), use the
772772
string ``"hand2"``. You can also specify a bitmap and mask file of your own.
773+
On Windows a cursor file (:file:`.cur` or :file:`.ani`) may be used directly,
774+
giving its path preceded with an ``@``, as in ``"@C:/cursors/bart.ani"``.
773775
See page 179 of Ousterhout's book.
774776

775777
distance

Lib/tkinter/messagebox.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,24 +99,24 @@ def showerror(title=None, message=None, **options):
9999

100100

101101
def askquestion(title=None, message=None, **options):
102-
"Ask a question"
102+
"Ask a question; return the symbolic name of the selected button"
103103
return _show(title, message, QUESTION, YESNO, **options)
104104

105105

106106
def askokcancel(title=None, message=None, **options):
107-
"Ask if operation should proceed; return true if the answer is ok"
107+
"Ask if operation should proceed; return True if the answer is ok"
108108
s = _show(title, message, QUESTION, OKCANCEL, **options)
109109
return s == OK
110110

111111

112112
def askyesno(title=None, message=None, **options):
113-
"Ask a question; return true if the answer is yes"
113+
"Ask a question; return True if the answer is yes"
114114
s = _show(title, message, QUESTION, YESNO, **options)
115115
return s == YES
116116

117117

118118
def askyesnocancel(title=None, message=None, **options):
119-
"Ask a question; return true if the answer is yes, None if cancelled."
119+
"Ask a question; return True if the answer is yes, None if cancelled"
120120
s = _show(title, message, QUESTION, YESNOCANCEL, **options)
121121
# s might be a Tcl index object, so convert it to a string
122122
s = str(s)
@@ -126,7 +126,7 @@ def askyesnocancel(title=None, message=None, **options):
126126

127127

128128
def askretrycancel(title=None, message=None, **options):
129-
"Ask if operation should be retried; return true if the answer is yes"
129+
"Ask if operation should be retried; return True if the answer is retry"
130130
s = _show(title, message, WARNING, RETRYCANCEL, **options)
131131
return s == RETRY
132132

0 commit comments

Comments
 (0)