diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-06-08 18:44:30 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-06-08 18:44:30 +0300 |
commit | 67ef7e7b5b608eebe432bf8d4062ff04f3aff3f4 (patch) | |
tree | 4e7c9efe887e27f38e971c18dd68e3a19a6abd7b | |
parent | 29e26a72d789714f491ba7ef64dfa956df6be6ec (diff) | |
parent | 4fafda731ac36ba2bb77342294cca70856c46505 (diff) | |
download | cpython-git-67ef7e7b5b608eebe432bf8d4062ff04f3aff3f4.tar.gz |
Issue #24408: Fixed AttributeError in measure() and metrics() methods of
tkinter.Font.
-rw-r--r-- | Lib/tkinter/font.py | 6 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Lib/tkinter/font.py b/Lib/tkinter/font.py index e74049c8aa..136425726a 100644 --- a/Lib/tkinter/font.py +++ b/Lib/tkinter/font.py @@ -151,7 +151,7 @@ class Font: 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 @@ class Font: 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 @@ -27,6 +27,9 @@ Core and Builtins 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. |