[Python-checkins] cpython (3.5): Issue #24408: Fixed AttributeError in measure() and metrics() methods of
serhiy.storchaka
python-checkins at python.org
Mon Jun 8 17:44:51 CEST 2015
https://hg.python.org/cpython/rev/fb05c1355a90
changeset: 96541:fb05c1355a90
branch: 3.5
parent: 96539:c52f381fe674
user: Serhiy Storchaka <storchaka at gmail.com>
date: Mon Jun 08 18:43:55 2015 +0300
summary:
Issue #24408: Fixed AttributeError in measure() and metrics() methods of
tkinter.Font.
files:
Lib/tkinter/font.py | 6 +++---
Misc/NEWS | 3 +++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/Lib/tkinter/font.py b/Lib/tkinter/font.py
--- a/Lib/tkinter/font.py
+++ b/Lib/tkinter/font.py
@@ -151,7 +151,7 @@
args = (text,)
if displayof:
args = ('-displayof', displayof, text)
- return self._root.tk.getint(self._call("font", "measure", self.name, *args))
+ return self._tk.getint(self._call("font", "measure", self.name, *args))
def metrics(self, *options, **kw):
"""Return font metrics.
@@ -164,13 +164,13 @@
args = ('-displayof', displayof)
if options:
args = args + self._get(options)
- return self._root.tk.getint(
+ return self._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:]] = self._root.tk.getint(res[i+1])
+ options[res[i][1:]] = self._tk.getint(res[i+1])
return options
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -15,6 +15,9 @@
Library
-------
+- Issue #24408: Fixed AttributeError in measure() and metrics() methods of
+ tkinter.Font.
+
- Issue #14373: C implementation of functools.lru_cache() now can be used with
methods.
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list