pygame-ce
pygame-ce copied to clipboard
Fix `pygame.sprite.Group.has()` behavior for no sprites given
Make Group.has() return True instead of False 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.
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'll post it in the issue.
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.
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.