-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PEP 8: Consider removing "two spaces after period" #3024
Comments
IMO, consistency is important for things that actually make a meaningful difference (source syntax, rendered output, etc), but I view period spacing (and similar spacing/line break issues) as too trivial to even make a one-click review suggestion for, much less open a whole new PR—and that's from someone who's close to as nitpicky as they come on docs formatting. We have a lifetime's worth of more important issues to worry about. Furthermore, while I understand the historical reasons for it (with Emacs, etc.), this sentence as it stands doesn't seem to really reflect the current reality, since grepping through To note, we removed a similar sentence (and several other similarly prescriptive restrictions) in PEP 12 with PR #2374 , a change which, after a lengthy discussion, had a broad consensus behind it. I would just elide that line completely, since the rewrite following the devguide is just restating one of the universal basic rules for English typography (or really, most Latin-script—not sure any modern convention mandates zero or three+ spaces after periods) and it leads to a net decrease in prescriptive rules. |
+1. Never been a fan of "two spaces after a full stop", since layout can handle that sort of thing better than content can. |
cc. @gvanrossum & @warsaw |
I’m fine with removing this recommendation as long as we don’t condemn two spaces. We don’t want to encourage a barrage of “remove extra space per PEP 8” PRs. The devguide wording is fine. |
Like this? - You should use two spaces after a sentence-ending period in multi-
+ You should use one or two spaces after a sentence-ending period in multi-
sentence comments, except after the final sentence. |
Maybe just remove the sentence? I doubt anyone is going to want to add three or zero spaces, so "one or two spaces" doesn't really add anything useful any more. |
Since this is a known point of controversy, I'd like to see some language that explicitly endorses both forms and doesn't require consistency (not even within a paragraph), so as to discourage "contributions" that purport to "fix" something. |
Thanks for the discussion. I'll open a PR with Hugo's suggestion, unless he beats me to it. |
Good point; we 100% don't want to generate more churn with people going back and forth with this, which would be counterproductive to the original motivation here. |
I didn't get a chance to see this before it was merged and closed, but +1 for the change. I still use two spaces after sentence ending periods, but I think the requirement to do so is a bit of an anachronism. |
Recently, we experienced an issue of wasted contributor time, wasted core dev time, and not to mention wasted CI resources because of core dev encouragement to revert an added sentence in the docs that did not use two spaces after a period. See python/cpython#102143 and python/cpython#102026 (comment).
The devguide says that one may use one or two spaces; it does not enforce either style.
In order to reduce churn, contributor confusion, and core dev confusion, I suggest to either remove the following sentence from PEP-8:
peps/pep-0008.txt
Lines 708 to 709 in 706b7aa
... or to make it similar to what the devguide advocates:
The text was updated successfully, but these errors were encountered: