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
assertion failure in ctypes in case an _anonymous_ attr appears outside _fields_ #75671
Comments
The following code causes an assertion failure: this is because MakeAnonFields() (in Modules/_ctypes/stgdict.c) goes over the however, PyObject_GetAttr() would succeed also in case it is a normal attribute |
In 2.7 "%U" is not recognized in the format string. >>> class Name(Structure):
... _fields_ = []
... _anonymous_ = ["x"]
... x = 42
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: '%U' is specified in _anonymous_ but not in _fields_ |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: