Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support iterable in display.update #2987

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ankith26
Copy link
Member

fixes #2986 by adding Iterable support in display.update

Before someone points it out, yes it could potentially slightly lower performance, though I have done no benchmarking. There is scope for optimizing this function with our usual tricks though, i.e fastcall and list/tuple "fast sequence" special path, though I will leave that for future PRs.

Also this PR takes the opportunity to improve the tests for this function.

@ankith26 ankith26 requested a review from a team as a code owner July 12, 2024 16:29
@yunline yunline added enhancement display pygame.display labels Jul 13, 2024
Copy link
Member

@oddbookworm oddbookworm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good change. Given the rare use I've seen of this, I don't expect too many people to take advantage though lol. Just got a couple small comments

docs/reST/ref/display.rst Show resolved Hide resolved
src_c/display.c Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

About Pygame's "Sequence" object and display.update
3 participants