diff options
author | jomo <github@jomo.tv> | 2014-07-16 00:33:43 +0200 |
---|---|---|
committer | jomo <github@jomo.tv> | 2014-07-16 00:33:43 +0200 |
commit | 1430a454ed18ac3a815cc4d39c7dffd2e6ac9e90 (patch) | |
tree | 493cbf18f33d635e7b3123438d8857f8544726c2 /README.md | |
parent | d2ec8b6d3f2d0804dbf52e7931cb589e9b323acd (diff) |
removed camelcase, added more coding style to readme
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -151,6 +151,33 @@ Use 2 spaces to indent. Always use double-quotes! Only use single-quotes when the string contains double-quotes that would need to be escaped. +## Capitalization +Do not use camelCase for variable or function names! Use under_score naming. + +## Aligning variable assignments +In case you have multiple variable assignments, align the equals sign: + +```Python +# bad +foo = 1 +foobar = 2 +a = 3 + +# good +foo = 1 +foobar = 2 +a = 3 +``` + +## Vertical spacing +Use at least one space left and one space right to equals signs, and one space right to colons. + +## Horizontal spacing +Leave two empty lines before function definitions. In case you need to use `@hook.something`, add the two lines before that, directly followed by the definition. + +## Meaningful names +Give function and variable names meaningful names. If you want to shorten long names, that's fine, but leave a comment on assigment with the actual meaning. + ## Comments Comments are good! Please comment everything that's non-obious or makes it easier to understand |