Issue #26177: Fixed the keys() method for Canvas and Scrollbar widgets.
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index 687a2ef..f51013e 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -1335,8 +1335,9 @@
raise TypeError("Tkinter objects don't support 'in' tests.")
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