[webkit-dev] python coding style, PEP-8, and 80-column line widths

Maciej Stachowiak mjs at apple.com
Sun Apr 18 16:11:27 PDT 2010

On Apr 18, 2010, at 12:33 PM, Chris Jerdonek wrote:

> I wanted to add a couple comments and a question to this discussion.
> On Fri, Apr 16, 2010 at 2:54 PM, Maciej Stachowiak <mjs at apple.com>  
> wrote:
>> I haven't contributed to WebKit's Python code yet, but I will say  
>> that I
>> agree with Eric's sentiments here. 80-column limit is archaic and  
>> pointless.
>> No one is developing WebKit on a vt220.
> Note that there are contexts where the limit does come into play  
> that the
> user might not have as much control over, for example pasting into  
> the body
> of an e-mail or into the comment box in bugs.webkit.org.

That reminds me, we should turn off the 80-column limit on bugs.webkit.org 
  - there's no need for it to hard-wrap your text. That being said,  
we've lived for years with the fact that C++ code may get wrapped  
badly in these contexts and it hasn't really been an issue.

> Take a look at these two comments for example (which, incidentally,  
> are
> about crash logs rather than code):
> https://bugs.webkit.org/show_bug.cgi?id=23558#c4
> https://bugs.webkit.org/show_bug.cgi?id=36707#c1
> So non-Python developers know, one argument for treating Python  
> differently
> (aside from PEP8) is that the language supports a syntax for  
> continuing
> lines to the next line that other languages don't (implied line  
> continuation).
> Finally, just to clarify, which parts of PEP8 are we discussing  
> ignoring?
> PEP8 has more specific guidelines for docstrings and how they should  
> be
> formatted.  For instance, it also contains this guideline in  
> addition to
> the blanket 79-character limit:  "For flowing long blocks of text  
> (docstrings
> or comments), limiting the length to 72 characters is recommended."

I'm happy to let the people who hack on Python most decide whether a  
column limit is appropriate and if so which ones.


More information about the webkit-dev mailing list