New submission from David Lambert :
Does aksokcancel return "true" or True ? The docstring should say True This is pervasive throughout the module. tkinter has such a mishmash of numbers supplied as strings, strings supplied as constants making this carelessness egregious. On the topic of constants, the messagebox module redefines OK. You might argue that the definition didn't change. I suspect this issue applies to all versions of tkinter or Tkinter having the messagebox.
# types
ABORTRETRYIGNORE = "abortretryignore"
OK = "ok"
...
# replies
...
OK = "ok"
def askokcancel(title=None, message=None, **options):
"Ask if operation should proceed; return true if the answer is ok"
s = _show(title, message, QUESTION, OKCANCEL, **options)
return s == OK
----------
assignee: docs@python
components: Documentation
messages: 355729
nosy: David Lambert, docs@python
priority: normal
severity: normal
status: open
title: tkinter messagebox is sloppy
type: enhancement
versions: Python 3.6
_______________________________________
Python tracker
https://bugs.python.org/issue38649
_______________________________________