Skip to content

Expand SpriteList.extend typing to include Iterables of Sprites#1269

Merged
einarf merged 3 commits intopythonarcade:developmentfrom
pushfoo:improve_spritelist_extend_typing
Jul 12, 2022
Merged

Expand SpriteList.extend typing to include Iterables of Sprites#1269
einarf merged 3 commits intopythonarcade:developmentfrom
pushfoo:improve_spritelist_extend_typing

Conversation

@pushfoo
Copy link
Member

@pushfoo pushfoo commented Jul 8, 2022

It seems reasonable to support this, and it's easier than bringing SpriteList into full compliance with the MutableSequence ABC. It also seems more elegant to use generators of various sorts to create sprites instead of creating a second list, then copying from it to the SpriteList's internal one.

@einarf
Copy link
Member

einarf commented Jul 12, 2022

Much better.

@einarf einarf merged commit e4ddbba into pythonarcade:development Jul 12, 2022
@pushfoo pushfoo deleted the improve_spritelist_extend_typing branch July 12, 2022 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants