RESOLVED FIXED 37062
website: Mention Python style on the style guidelines page
https://bugs.webkit.org/show_bug.cgi?id=37062
Summary website: Mention Python style on the style guidelines page
Chris Jerdonek
Reported 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.
Attachments
Chris Jerdonek
Comment 1 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
Dirk Pranke
Comment 2 2011-04-01 16:24:30 PDT
closing. This was added quite a while ago.
Note You need to log in before you can comment on or make changes to this bug.