Bug 37062 - website: Mention Python style on the style guidelines page
Summary: website: Mention Python style on the style guidelines page
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Website (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Dirk Pranke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-03 13:45 PDT by Chris Jerdonek
Modified: 2011-04-01 16:24 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Jerdonek 2010-04-03 13:45:17 PDT
This report would also be a good place to discuss any additional rules we want to add, for example the ones Shinichiro mentioned here:

https://bugs.webkit.org/show_bug.cgi?id=33639#c7

For easier reference, I will paste them below.  (I'm going to remove the line mentioning my double-quotes proposal though, since I've since changed my preference to single quotes.)

(From bug 33639, comment 7)
> I strongly agree to have a style guide for python. It should be PEP8 with a few
> modifications. The candidates of the modifications I remember are
> 
> - don't put (or put) parentheses for if, elif, and while statements.
> - remove 80 characters per a line rule to be consistent with other code in
> WebKit?
> - prefer "%(file)s:%(line)d" % {"file": file, "line": line} to "%s:%d" % (file,
> line) for long string interpolations.
> - prefer r"(?P<file>\w+):(?P<line>\d+)" to r"(\w+):(\d+)" for long regexps.

I also added a section to the wiki page which can contain our latest iteration and which we can modify as a group, prior to putting on the web site.
Comment 1 Chris Jerdonek 2010-04-03 13:46:33 PDT
(In reply to comment #0)
> I also added a section to the wiki page which can contain our latest iteration
> and which we can modify as a group, prior to putting on the web site.

http://trac.webkit.org/wiki/PythonGuidelines#Style
Comment 2 Dirk Pranke 2011-04-01 16:24:30 PDT
closing. This was added quite a while ago.