On Thu, Feb 21, 2008 at 9:15 AM, Barry Warsaw <barry@python.org> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Feb 21, 2008, at 11:21 AM, skip.montanaro wrote:
Author: skip.montanaro Date: Thu Feb 21 17:21:15 2008 New Revision: 60919
Modified: peps/trunk/pep-0008.txt Log: Replace "looks ugly" with a hopefully more concrete explanation of why line wrapping is bad - it disrupts the visual structure of the code.
Modified: peps/trunk/pep-0008.txt = = = = = = = = ====================================================================== --- peps/trunk/pep-0008.txt (original) +++ peps/trunk/pep-0008.txt Thu Feb 21 17:21:15 2008 @@ -77,10 +77,11 @@
There are still many devices around that are limited to 80 character lines; plus, limiting windows to 80 characters makes it possible to have - several windows side-by-side. The default wrapping on such devices looks - ugly. Therefore, please limit all lines to a maximum of 79 characters. - For flowing long blocks of text (docstrings or comments), limiting the - length to 72 characters is recommended. + several windows side-by-side. The default wrapping on such devices + disrupts the visual structure of the code, making it more difficult to + understand. Therefore, please limit all lines to a maximum of 79 + characters. For flowing long blocks of text (docstrings or comments), + limiting the length to 72 characters is recommended.
Why should docstrings and comments be limited to 72 characters when code is limited to 79 characters? I ask because there is an ongoing debate at my company about this.
Personally, I see no justification for it, and further, it's a pita to support automatically because tools like Emacs only have one auto- wrapping variable (fill-column). Emacs doesn't know that it should fill comments and docstrings different than code lines, so you have to do a bunch of manual crud to support these guidelines.
I recommend removing the guideline of 72 characters, and just say everything, code, comments, and docstrings should be no wider than 79 characters.
+1 from me. I know having a separate line break rule just for PEPs and such is a pain as I am having to constantly look down at the column number to know when I have run afoul of this. -Brett