Bug 37062
| Summary: | website: Mention Python style on the style guidelines page | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Jerdonek <cjerdonek> |
| Component: | WebKit Website | Assignee: | Dirk Pranke <dpranke> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | abarth, cjerdonek, dpranke, eric, hamaji, levin |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
Chris Jerdonek
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Chris Jerdonek
(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
Dirk Pranke
closing. This was added quite a while ago.