Anonymous avatar Anonymous committed 923c873

Merged revisions 78989 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
r78989 | matthias.klose | 2010-03-16 11:51:28 +0100 (Tue, 16 Mar 2010) | 10 lines

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.
........
................

Comments (0)

Files changed (2)

Lib/tkinter/messagebox.py

     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"
 Library
 -------
 
+- Issue #4961: Inconsistent/wrong result of askyesno function in tkMessageBox
+  with Tcl/Tk-8.5.
+
 - Issue #7356: ctypes.util: Make parsing of ldconfig output independent of
   the locale.
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.