-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add guidelines on multiple assignments in a single line #80
Comments
I think multiple assignments from a single call is okay (unpacking): a, b, c = f() but multiple assignments from multiple calls should probably be avoided. |
I agree with omus. |
What about the following pattern:
IIRC there are cases where one assignment outside an |
That case seems beyond the scope of this issue. |
the reason i don't like it is for:
I guess another way to describe this rule would be "Do not create tuples just to unpack them on the same line" ? |
Sometimes one might want to do multiple assignments in a single line to reduce number of lines of code, e.g.
Pmin, Pmax = get_pmin(fnm.system), get_pmax(fnm.system)
If this is considered bad style by us, we should probably add a comment about this in the docs.
The text was updated successfully, but these errors were encountered: