-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Allow initial comma #1867
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
Comments
This is not the appropriate place to propose language changes. Try the python-ideas mailing list. However, I don't think you'll get anyone to agree. What kind of code style are you using where you want to put commas at the start of the line? That is totally non-standard (see PEP 8), ugly, and confusing. Arbitrary symmetry is not a good reason for changing the language. We don't have a |
I surely agree, that not ignoring the sequence is essential. Else one would loose identifier space and thus information. I would never have the idea to make all permutations of But the comma is just a separator. Why did they allow to have the comma before a closing bracket/parenthesis/brace? Because of symmetry between lines, is my guess. Occasionally one sees many spaces just the have the final comma aligned vertically. That could be avoided by placing the comma at the beginning. I personally also have a macro in the editor that evaluates a line in the parameter list, but drops an initial comma before doing that. Therefore this is my preferred formatting. I don't think that PEP is wrong. I just don't want to be restricted by unnecessary rules. Rules need to have a reason beyond someone dictating them. If that is the case, I follow them, because I see the reason, but not because someone dictates them. I'll go to Python Ideas, then. Thanks. |
Allow initial comma.
Final comma works:
Initial comma does not work:
To make the syntax symmetric in this regard
gives more freedom to format the code.
I occasionally found the restriction an unnecessary nuisance.
Before writing a PEP,
I would like to discuss,
The text was updated successfully, but these errors were encountered: