Skip to content

Update putpixel type hint to allow lists in xy#9585

Open
radarhere wants to merge 1 commit intopython-pillow:mainfrom
radarhere:putpixel_xy
Open

Update putpixel type hint to allow lists in xy#9585
radarhere wants to merge 1 commit intopython-pillow:mainfrom
radarhere:putpixel_xy

Conversation

@radarhere
Copy link
Copy Markdown
Member

@radarhere radarhere commented Apr 23, 2026

putpixel() accepts a list of integers as xy coordinates.

>>> from PIL import Image
>>> im = Image.new("RGB", (1, 1))
>>> im.putpixel([0, 0], (255, 0, 0))
>>>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant