[New-bugs-announce] [issue38649] tkinter messagebox is sloppy

David Lambert report at bugs.python.org
Wed Oct 30 15:37:05 EDT 2019


New submission from David Lambert <b49p23tivg at gmail.com>:

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 at python
components: Documentation
messages: 355729
nosy: David Lambert, docs at python
priority: normal
severity: normal
status: open
title: tkinter messagebox is sloppy
type: enhancement
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38649>
_______________________________________


More information about the New-bugs-announce mailing list