explicitly override a rule of PEP-8
[Imported from Trac: page CodingStandards, version 8]
parent
6e12b9a4cd
commit
a1a026ea4c
|
@ -12,7 +12,7 @@ Tahoe requires Python v2.4.2 or greater. No effort should be made to offer compa
|
|||
* Use `underscore_separated_names` for functions, `CamelCapNames` for classes, `alllowercasenames` for modules, and `ALL_CAPS_NAMES` for constants. Use all lower-case variable names (e.g. `variable_name` or `variablename`). Prepend a leading underscore to private names.
|
||||
* Put parenthesis around tuples if it helps make the code more readable, leave them off if not.
|
||||
|
||||
### comments, idioms, miscellany, license
|
||||
### comments, idioms, miscellany, license, imports
|
||||
|
||||
Here is a useful header for starting new Python files:
|
||||
|
||||
|
@ -33,6 +33,8 @@ from allmydata.util.assertutil import _assert, precondition, postcondition
|
|||
# your code here
|
||||
```
|
||||
|
||||
* Feel free to ignore the part of PEP-8 that says to put each module import on a separate line, but don't import modules from multiple separate packages on the same line.
|
||||
|
||||
### truths and falsehoods
|
||||
|
||||
* Don't use the literals `True` or `False` in conditional expressions -- instead just write the expression which will evaluate to true or false. For example, write `if expr:` instead of `if expr == True:` and `if not expr:` instead of `if expr == False:`.
|
||||
|
|
Loading…
Reference in a new issue