summaryrefslogtreecommitdiff
path: root/Lib/tkinter/font.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-05-06 14:00:04 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2015-05-06 14:00:04 +0300
commit645058d11a0ce6616d93cce692bb1378e61efb80 (patch)
tree16ce60bf4c02ce722c8873bcf8975d0aea1e2030 /Lib/tkinter/font.py
parent008d88b46218ea618455c89cba74132be223c1a4 (diff)
downloadcpython-git-645058d11a0ce6616d93cce692bb1378e61efb80.tar.gz
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/font.py')
-rw-r--r--Lib/tkinter/font.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/tkinter/font.py b/Lib/tkinter/font.py
index b96673208b..a04fedf655 100644
--- a/Lib/tkinter/font.py
+++ b/Lib/tkinter/font.py
@@ -153,7 +153,7 @@ class Font:
args = (text,)
if displayof:
args = ('-displayof', displayof, text)
- return int(self._call("font", "measure", self.name, *args))
+ return self._root.tk.getint(self._call("font", "measure", self.name, *args))
def metrics(self, *options, **kw):
"""Return font metrics.
@@ -166,13 +166,13 @@ class Font:
args = ('-displayof', displayof)
if options:
args = args + self._get(options)
- return int(
+ return self._root.tk.getint(
self._call("font", "metrics", self.name, *args))
else:
res = self._split(self._call("font", "metrics", self.name, *args))
options = {}
for i in range(0, len(res), 2):
- options[res[i][1:]] = int(res[i+1])
+ options[res[i][1:]] = self._root.tk.getint(res[i+1])
return options