-
-
Notifications
You must be signed in to change notification settings - Fork 162
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
Fix pygame.sprite.Group.has()
behavior for no sprites given
#2998
base: main
Are you sure you want to change the base?
Conversation
Can you motivate this change with an example of when this change would actually matter? Offhand, I can't come up with a valid use-case where it should matter what this returns if no sprites are passed |
Sure. |
I agree that this change is logical, but also, as pointed out before, it could be a backwards incompatible change that could break someones usage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this makes sense, but I think this should wait for compatibility breaking release before being merged as the current behaviour has probably been around since the sprite group was created.
Thanks for the PR! Essentially this PR has my approval as well, I'm just drafting it for now because it cannot be merged right now for reasons Myre stated. |
Make
Group.has()
returnTrue
instead ofFalse
when no sprites (empty list, no arguments, etc.) are given.Closes #2993
This is potentially a breaking change. Might not get approved. See issue for discussion.