-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
repr()
of some classes doesn't use subclass name
#3044
Comments
I'm not sure that this is something we should do. Most pygame-ce objects, while they can be subclassed, don't make much sense to do so regularly. IMO if you're subclassing these classes, then you should be writing your own custom @Starbuck5 might have more insight into this than I do though |
For the For class |
Hmm, I guess a lot of the other |
Environment:
pygame.print_debug_info()
Current behavior:
In some classes such as
Surface
,Rect
,Vector2
, and others, therepr()
behavior uses a hard-coded class name string instead of a dynamic access of the class name.Subclass instances and normal instances appear the same with
repr()
.Example with
Vector2
subclass:Expected behavior:
The
repr()
should include the name of the actual instance class instead of the class that implemented the functionality.Test code
Side note:
I think the
Surface
repr should also say when it has per-pixel alpha.The text was updated successfully, but these errors were encountered: