From: Andrew Svetlov Date: Mon, 30 Jul 2012 16:59:53 +0000 (+0300) Subject: Issue #12288: Consider '0' and '0.0' as valid initialvalue for tkinter SimpleDialog. X-Git-Tag: v3.3.0b2~75^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1fb0e3f3a2dde81f428ec0a8bcffffdb6f622292;p=thirdparty%2FPython%2Fcpython.git Issue #12288: Consider '0' and '0.0' as valid initialvalue for tkinter SimpleDialog. --- diff --git a/Lib/tkinter/simpledialog.py b/Lib/tkinter/simpledialog.py index 885804b3c703..45302b4569b1 100644 --- a/Lib/tkinter/simpledialog.py +++ b/Lib/tkinter/simpledialog.py @@ -282,7 +282,7 @@ class _QueryDialog(Dialog): self.entry = Entry(master, name="entry") self.entry.grid(row=1, padx=5, sticky=W+E) - if self.initialvalue: + if self.initialvalue is not None: self.entry.insert(0, self.initialvalue) self.entry.select_range(0, END) diff --git a/Misc/ACKS b/Misc/ACKS index e04677ede1aa..1a094a17497b 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -633,6 +633,7 @@ Carl Meyer Mike Meyer Steven Miale Trent Mick +Tom Middleton Stan Mihai Stefan Mihaila Aristotelis Mikropoulos diff --git a/Misc/NEWS b/Misc/NEWS index 5ede32413d5a..454a70cc1733 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -98,6 +98,9 @@ Core and Builtins Library ------- +- Issue #12288: Consider '0' and '0.0' as valid initialvalue + for tkinter SimpleDialog. + - Issue #15489: Add a __sizeof__ implementation for BytesIO objects. Patch by Serhiy Storchaka.