Skip to content

Commit 1fb0e3f

Browse files
committed
Issue python#12288: Consider '0' and '0.0' as valid initialvalue for tkinter SimpleDialog.
1 parent 3b79668 commit 1fb0e3f

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Lib/tkinter/simpledialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def body(self, master):
282282
self.entry = Entry(master, name="entry")
283283
self.entry.grid(row=1, padx=5, sticky=W+E)
284284

285-
if self.initialvalue:
285+
if self.initialvalue is not None:
286286
self.entry.insert(0, self.initialvalue)
287287
self.entry.select_range(0, END)
288288

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,7 @@ Carl Meyer
633633
Mike Meyer
634634
Steven Miale
635635
Trent Mick
636+
Tom Middleton
636637
Stan Mihai
637638
Stefan Mihaila
638639
Aristotelis Mikropoulos

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ Core and Builtins
9898
Library
9999
-------
100100

101+
- Issue #12288: Consider '0' and '0.0' as valid initialvalue
102+
for tkinter SimpleDialog.
103+
101104
- Issue #15489: Add a __sizeof__ implementation for BytesIO objects.
102105
Patch by Serhiy Storchaka.
103106

0 commit comments

Comments
 (0)