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

Correction to attribute name in pygame.sprite.LayeredUpdates - it is … #1708

Merged
merged 1 commit into from May 5, 2020
Merged

Correction to attribute name in pygame.sprite.LayeredUpdates - it is … #1708

merged 1 commit into from May 5, 2020

Conversation

glennmackintosh
Copy link
Contributor

…_layer, not layer

The attribute name is incorrect in the documentation for pygame.sprite.LayeredUpdates. The attribute that the sprite has to have for it to be managed automatically is _layer not layer (note the leading underscore). A attribute in the sprite with the name 'layer' has no effect but '_layer' works perfectly.

Note: This is likely also true for pygame.sprite.DirtySprite where it says 'layer = 0' and it probably should say '_layer = 0' but I have not tested or investigated this, so I am only mentioning it here and not correcting it.

…_layer, not layer

The attribute name is incorrect in the documentation for pygame.sprite.LayeredUpdates. The attribute that the sprite has to have for it to be managed automatically is _layer not layer (note the leading underscore). A attribute in the sprite with the name 'layer' has no effect but '_layer' works perfectly.

Note: This is likely also true for pygame.sprite.DirtySprite where it says 'layer = 0' and it probably should say '_layer = 0' but I have not tested or investigated this, so I am only mentioning it here and not correcting it.
Copy link
Member

@illume illume left a comment

Choose a reason for hiding this comment

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

Thanks :)

@illume illume merged commit bf504aa into pygame:master May 5, 2020
@glennmackintosh
Copy link
Contributor Author

glennmackintosh commented May 5, 2020 via email

@illume illume added the sprite pygame.sprite label May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sprite pygame.sprite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants