Issue #26177: Fixed the keys() method for Canvas and Scrollbar widgets.

This commit is contained in:
Serhiy Storchaka 2016-03-09 10:52:08 +02:00
commit 2d68f18656
6 changed files with 183 additions and 138 deletions

View file

@ -1336,8 +1336,9 @@ class Misc:
self.configure({key: value})
def keys(self):
"""Return a list of all resource names of this widget."""
return [x[0][1:] for x in
self.tk.splitlist(self.tk.call(self._w, 'configure'))]
splitlist = self.tk.splitlist
return [splitlist(x)[0][1:] for x in
splitlist(self.tk.call(self._w, 'configure'))]
def __str__(self):
"""Return the window path name of this widget."""
return self._w