[webkit-dev] python coding style, PEP-8, and 80-column line widths
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>
>> 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
>> 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,
> about crash logs rather than code):
> So non-Python developers know, one argument for treating Python
> (aside from PEP8) is that the language supports a syntax for
> lines to the next line that other languages don't (implied line
> Finally, just to clarify, which parts of PEP8 are we discussing
> PEP8 has more specific guidelines for docstrings and how they should
> formatted. For instance, it also contains this guideline in
> addition to
> the blanket 79-character limit: "For flowing long blocks of text
> 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