Mercurial > cpython-lru_cache-weakref
diff Lib/tkinter/messagebox.py @ 59646:9ffc8f0515cd
Merged revisions 78988 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78988 | matthias.klose | 2010-03-16 11:48:52 +0100 (Tue, 16 Mar 2010) | 3 lines
- Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox
with Tcl/Tk-8.5.
........
| author | Matthias Klose <doko@ubuntu.com> |
|---|---|
| date | Tue, 16 Mar 2010 10:51:28 +0000 |
| parents | ef4cca2d6171 |
| children |
line wrap: on
line diff
--- a/Lib/tkinter/messagebox.py Tue Mar 16 00:36:26 2010 +0000 +++ b/Lib/tkinter/messagebox.py Tue Mar 16 10:51:28 2010 +0000 @@ -70,11 +70,13 @@ if title: options["title"] = title if message: options["message"] = message res = Message(**options).show() - # In some Tcl installations, Tcl converts yes/no into a boolean + # In some Tcl installations, yes/no is converted into a boolean. if isinstance(res, bool): - if res: return YES + if res: + return YES return NO - return res + # In others we get a Tcl_Obj. + return str(res) def showinfo(title=None, message=None, **options): "Show an info message"
