[Webkit-unassigned] [Bug 33639] WebKit needs a python style checker

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 13 22:45:05 PST 2010


--- Comment #7 from Shinichiro Hamaji <hamaji at chromium.org>  2010-01-13 22:45:04 PST ---
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

- (as Chris proposed) use double-quotes for string literals. (We may be able to
use single-quoted literals for strings which have double-quotes in the string?
E.g., '<a href="webkit.org">webkit</a>')
- 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
- 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.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list