Index: Lib/lib-tk/Dialog.py =================================================================== --- Lib/lib-tk/Dialog.py (revision 63734) +++ Lib/lib-tk/Dialog.py (working copy) @@ -14,12 +14,16 @@ cnf = _cnfmerge((cnf, kw)) self.widgetName = '__dialog__' Widget._setup(self, master, cnf) - self.num = self.tk.getint( - self.tk.call( - 'tk_dialog', self._w, - cnf['title'], cnf['text'], - cnf['bitmap'], cnf['default'], - *cnf['strings'])) + self.num = self.tk.call('tk_dialog', self._w, cnf['title'], + cnf['text'], cnf['bitmap'], cnf['default'], + *cnf['strings']) + try: + self.num = int(self.num) + except TypeError: + # XXX for some reason we got a cached literal from Tk interpreter. + # issue 1447222 + self.num = int(str(self.num[0])) + try: Widget.destroy(self) except TclError: pass def destroy(self): pass