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

Make ModeDescriptor a NamedTuple #7951

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Make ModeDescriptor a NamedTuple #7951

merged 1 commit into from
Apr 11, 2024

Conversation

Yay295
Copy link
Contributor

@Yay295 Yay295 commented Apr 6, 2024

This slightly simplifies the code, and adds the benefit of being a NamedTuple.

@radarhere
Copy link
Member

radarhere commented Apr 6, 2024

Could you elaborate on what the benefits of being a NamedTuple are over the current behaviour?

@Yay295
Copy link
Contributor Author

Yay295 commented Apr 6, 2024

Mostly that it's immutable, and we get an __init__ method for free.

@hugovk hugovk merged commit 4897954 into python-pillow:main Apr 11, 2024
57 checks passed
@Yay295 Yay295 deleted the patch-2 branch April 11, 2024 12:53
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

Successfully merging this pull request may close these issues.

None yet

3 participants