summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-05-22 08:54:41 (GMT)
committerGitHub <noreply@github.com>2023-05-22 08:54:41 (GMT)
commit9bc80dac47f6d43d0bbfbf10c4cc3848b175e97f (patch)
tree880c0b929091cb922c9f864b7a58b0e4ac90838a /Lib/tkinter
parent6fba0314765d7c58a33e9859d9cd5bcc35d2fd0a (diff)
downloadcpython-9bc80dac47f6d43d0bbfbf10c4cc3848b175e97f.zip
cpython-9bc80dac47f6d43d0bbfbf10c4cc3848b175e97f.tar.gz
cpython-9bc80dac47f6d43d0bbfbf10c4cc3848b175e97f.tar.bz2
gh-94473: Flatten arguments in tkinter.Canvas.coords() (GH-98479)
It now accepts not only "x1, y1, x2, y2, ..." and "[x1, y1, x2, y2, ...]", but also "(x1, y1), (x2, y2), ..." and "[(x1, y1), (x2, y2), ...]".
Diffstat (limited to 'Lib/tkinter')
-rw-r--r--Lib/tkinter/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py
index bf0b3b9..c675c51 100644
--- a/Lib/tkinter/__init__.py
+++ b/Lib/tkinter/__init__.py
@@ -2817,7 +2817,7 @@ class Canvas(Widget, XView, YView):
def coords(self, *args):
"""Return a list of coordinates for the item given in ARGS."""
- # XXX Should use _flatten on args
+ args = _flatten(args)
return [self.tk.getdouble(x) for x in
self.tk.splitlist(
self.tk.call((self._w, 'coords') + args))]