← 返回首页
Tkinter Canvas.coords does not flatten arguments · Issue #94473 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Tkinter Canvas.coords does not flatten arguments #94473

New issue
New issue

Description

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

  • CPython versions tested on: 3.10.4
  • Operating system: Windows 10

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    • Open in GitHub Copilot app

    Footer

    © 2026 GitHub, Inc.