Changes between Version 18 and Version 19 of CodingStandards
- Timestamp:
- 2012-05-18T21:33:34Z (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CodingStandards
v18 v19 39 39 * Ignore the part of PEP-257 which says to put the trailing {{{"""}}} of a multi-line docstring on a separate line separated by a blank line. (That rule appears to have been motivated by a limitation of Emacs which has been fixed.) 40 40 * Ignore the part of PEP-8 which specifes 79- or 72- char line widths. We use 77 columns. In emacs set {{{fill-column}}} to 77 (e.g. {{{M-x set-variable fill-column 77}}}). 41 * PEP 8 says: "If operators with different priorities are used, consider adding whitespace around the operators with the lowest priority(ies)." This is a good rule; note that it also applies to some non-obvious low-priority operators, like '{{{:}}}' for list slicing. (Example: {{{a[b-c : d]}}} good, {{{a[b - c:d]}}} bad. If a slice is from the start or to the end of the array, put the '{{{:}}}' immediately next to the bracket on that side.) 41 42 42 43 === truths and falsehoods ===