Changes between Version 13 and Version 14 of PythonGuidelines
- Timestamp:
- Apr 3, 2010, 1:28:15 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PythonGuidelines
v13 v14 8 8 9 9 * WebKit's Python scripts require Python 2.5 or higher to run. 10 * Informally, we try to follow [http://www.python.org/dev/peps/pep-0008/ PEP8]. Eventually we may make this official.11 10 * [http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/test-webkitpy Scripts/test-webkitpy] unit tests the Python code. It also cleans orphan *.pyc files from webkitpy (i.e. .pyc files without a corresponding .py file). You can also do this manually (for all *.pyc files in webkitpy) using the following command: 12 11 {{{ … … 31 30 == Style == 32 31 33 For discussion purposes, here are some style guidelines to consider in addition to [http://www.python.org/dev/peps/pep-0008/ PEP8]: 32 Informally, we try to follow [http://www.python.org/dev/peps/pep-0008/ PEP8]. Eventually we may make this official. 33 34 For the time being, we are not following the 79 character line length limit (or any line length limit for that matter). 35 36 For discussion purposes, here are some additional guidelines to consider: 34 37 35 38 * Prefer single quotes to double quotes. Use double quotes only if the string contains single quotes (or if you are using "triple double quotes"). This makes cutting and pasting from the console easier since Python itself behaves this way when rendering string values to the console.