-
Notifications
You must be signed in to change notification settings - Fork 21
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
Whitespace in slices when there is an open side #33
Comments
I'm 0.25 on this. Sometimes I like to see an additional set of parens for expressions in slices. Like:
|
Having looked through a bunch of diffs in the last hour, I've actually come around to Black's formatting here. The added space doesn't hurt. |
I can live with it, but it goes against PEP 8, IMHO:
|
Personally, I don't think it makes sense because this rule is inconsistent in that it causes spacing to change purely based on the type of expression (expressions are not treated uniformly). Ie. Each of the following would be a consistent formatting rule:
But not how it does it right now which is:
|
Addressing my previous comment -- I realize now that the addition of parens is impossible given Black's constraints. Adding parens would modify the AST which Black forbids to prevent changing semantics. @warsaw having read the PEP 8 section you quote, I don't see what part black violates here. |
I think that's fine. Let's close this one as "won't fix". |
Black does this, yuck!
The text was updated successfully, but these errors were encountered: