A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/python/cpython/issues/94473 below:

Tkinter Canvas.coords does not flatten arguments · Issue #94473 · python/cpython · GitHub

Bug report
Double nested arrays in tk.coords will produce errors in tkinter (_tkinter.TclError: wrong # coordinates: expected at least 4, got 2 in this case)

import tkinter as tk

coords = [[100, 100], [300, 300]]


root = tk.Tk()
canvas = tk.Canvas(width=400,
                   height=400,
                   background="bisque")
canvas.pack(fill="both", expand=True)
line = canvas.create_line(coords)
coords[1] = [200, 200]
canvas.coords(line, coords)  # line with error

root.mainloop()

Your environment

Linked PRs

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4