diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-05-06 11:00:04 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-05-06 11:00:04 (GMT) |
commit | 645058d11a0ce6616d93cce692bb1378e61efb80 (patch) | |
tree | 16ce60bf4c02ce722c8873bcf8975d0aea1e2030 /Lib/tkinter/simpledialog.py | |
parent | 008d88b46218ea618455c89cba74132be223c1a4 (diff) | |
download | cpython-645058d11a0ce6616d93cce692bb1378e61efb80.zip cpython-645058d11a0ce6616d93cce692bb1378e61efb80.tar.gz cpython-645058d11a0ce6616d93cce692bb1378e61efb80.tar.bz2 |
Issue #23880: Tkinter's getint() and getdouble() now support Tcl_Obj.
Tkinter's getdouble() now supports any numbers (in particular int).
Diffstat (limited to 'Lib/tkinter/simpledialog.py')
-rw-r--r-- | Lib/tkinter/simpledialog.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/tkinter/simpledialog.py b/Lib/tkinter/simpledialog.py index 45302b4..a95f551 100644 --- a/Lib/tkinter/simpledialog.py +++ b/Lib/tkinter/simpledialog.py @@ -325,7 +325,7 @@ class _QueryDialog(Dialog): class _QueryInteger(_QueryDialog): errormessage = "Not an integer." def getresult(self): - return int(self.entry.get()) + return self.getint(self.entry.get()) def askinteger(title, prompt, **kw): '''get an integer from the user @@ -344,7 +344,7 @@ def askinteger(title, prompt, **kw): class _QueryFloat(_QueryDialog): errormessage = "Not a floating point value." def getresult(self): - return float(self.entry.get()) + return self.getdouble(self.entry.get()) def askfloat(title, prompt, **kw): '''get a float from the user |