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.Struct.unpack to return a namedtuple for easier attribute access #47158
Comments
With the advent of collections.namedtuple, I thought that having a The regexp might not be immediately obvious as to what the format Suggestions and criticism are welcome. I think it would simplify using |
Okay, here's a new version of my patch. Instead of replacing the default |
Thanks for submitting the patch and the idea. I've previously looked at this approach and decided against it. The It is better to leave named tuples separate and allow users to combine Instead of this patch, I propose to add a simple example to the struct |
Added example to docs. See r63564. |
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: