On Thu, Feb 21, 2008 at 9:15 AM, Barry Warsaw <[EMAIL PROTECTED]> wrote: > 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.
People in your company have too much time on their hands. :-) > 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. I'm fine with getting rid of this, but since that originally comes from me, here's my justification. Somehow my Emacs usually defaults to 72 for its fill column. That means that when I reflow text in a block comment or docstring, it'll use this limit. OTOH I don't use anything to automatically fold long code lines: when they start wrapping I manually decide on the best place to break it (and my windows are typically 80 chars wide so I can have several side by side(*)). However there are occasions where I manually format docstrings or comments, and then I will again use 79 as the limit. (*) When is Emacs going to fix the bug where it decides to fold a line that's exactly as wide as the window? This 79 business is really silly, and had to impose on people using other editors. -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com