-
-
Notifications
You must be signed in to change notification settings - Fork 183
Incorrect error message for vectors #3066
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
Comments
This is probably related to the CPython API (but finding an answer online is hard because google doesn't understand the difference between python and cpython), but why is the function for setting the component also handling deletion? |
Hmm, so vector Also I am no C or CPython expert, but why is there seemingly unused @damusss I did a bit of research and found the relevant C-API stuff: pygame Lines 2605 to 2609 in 3183d16
|
Because it looks like someone at some point started implementing a
https://docs.python.org/3/c-api/object.html#c.PyObject_SetAttr |
In fact, looks like it might emit an error in the future as we have it python/cpython#106572 (comment) |
It handles deletion because that’s how the Python C API works. This is not about pyobject_setattr. |
It actually is. The docs and that cpython comment indicate that the behavior is deprecated and you shouldn't have PyObject_SetAttr do your deleting anymore |
Hold on, I'm dumb |
Thanks @aatle and @Starbuck5 for the info :) |
I was digging through the math.c source and found this:
I didn't try to delete the x attribute, I tried to delete the y attribute!
Implementation code (unchanged for 8 years):
The text was updated successfully, but these errors were encountered: