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

__struct_defaults__ is missing from Python type specification #779

Open
ncoghlan opened this issue Dec 3, 2024 · 0 comments
Open

__struct_defaults__ is missing from Python type specification #779

ncoghlan opened this issue Dec 3, 2024 · 0 comments

Comments

@ncoghlan
Copy link

ncoghlan commented Dec 3, 2024

Description

I am attempting to work around #778 by writing a recursive Struct traversal in Python as an alternative to asdict (this is going to be slow, but slow-and-working is better than not working).

From looking at the C code, __struct_defaults__ is available alongside __struct_fields__ (aligning from the end of the two sequences).

However, the Python typing stub for the C code is missing this attribute, so mypy et al complain about accessing the field.

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

No branches or pull requests

1 participant