4 ms·
Most code is read in fixed-width fonts. I don't see why this is controversial. The argument to use only one space after a sentence-ending period only makes se
by throw_away 13y ago
Most code is read in fixed-width fonts. I don't see why this is controversial. The argument to use only one space after a sentence-ending period only makes sense when reading in a variable-width font as the width of the space is corrected when rendered (and two spaces over-corrects).
- maciejgryka 13y agoI'm not sure I'd call it controversial, but it is definitely a small annoyance because of muscle memory. Anyway, in the grand scheme of things this is really insignificant :) The fact that PEP8 exists at all is just one of the things making Python great!
- throw_away 13y agoYa. Seems like it would have been better if the implementation of variable-width fonts didn't goof and over-correct when presented with two spaces. As it is, they need to do something special when they see Mr. SoAndSo or Dr. SoAndSo, which would be, presumably, language-dependent. Then, everyone could always type two spaces after a sentence-ending period and it would always look good, regardless of whether it was rendered as fixed- or variable-width.
- eevee 13y agoDo any variable-width fonts actually do that? Looking at your comment, for example, the spaces after periods look the same width as those between words to my eye.
- jedberg 13y agoThe em space fell out of favor when HTML got popular, because HTML renderers (ie. your browser) will strip extra spaces. So when looking at a web page, there actually is no difference between one and one hundred spaces (or two).
- kps 13y agoNo, extra space after a period is always in poor taste. Use a single word space between sentences. In the nineteenth century, which was a dark and inflationary age in typography and type design, many compositors were encouraged to stuff extra space between sentences. Generations of twentieth century typists were then taught to do the same, by hitting the spacebar twice after every period. Your typing as well asyour typesetting will benefit from unlearning this quaint Victorian habit. As a general rule, no more than a single space is required after a period, colon, or any other mark of punctuation. Larger spaces (e.g., en spaces) are *themselves* punctuation. — Robert Bringhurst, The Elements of Typographic Style, 3rd Edition, §2.1.4 (Some people go as far as to recommend less than word space after a period or comma, since the blank area above the punctuation mark contributes to the total visual white space.)