Skip to content

Simplify some code in dviread #28736

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

Merged
merged 3 commits into from
Aug 20, 2024
Merged

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Aug 20, 2024

PR summary

Admittedly, this is a bit of a stylistic preference, but I find it a bit confusing to do stuff like:

w, x, y, z = foo, bar, baz, quux

when the RHS parts are more complex than a simple value.

And with simple values like None, that can be simplified to:

w = x = y = z = None

but with things like [], then we don't want to do that, so it's simpler to make those separate lines.

PR checklist

I find it a bit confusing to use tuple packing and unpacking when the
RHS is more complex than a simple constant. Also, if we're assigning an
immutable constant to multiple things, it's simpler to use compound
assignment intead of the multiple copies in a tuple.
Hopefully it's clearer that this method is doing something stateful now.
@timhoffm timhoffm merged commit 1e8ea2f into matplotlib:main Aug 20, 2024
41 of 43 checks passed
@QuLogic QuLogic deleted the simplify-dviread branch August 20, 2024 19:48
@QuLogic QuLogic added this to the v3.10.0 milestone Aug 20, 2024
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.

3 participants