code_style.rst 897 B

123456789101112131415161718
  1. Basically, PEP8
  2. - Max line width: 80 chars.
  3. - Use camel case for class and type names
  4. - Use underscores for functions and variables.
  5. - Use double quotes.
  6. - Use parentheses instead of '\' for line continuation where ever possible (which is pretty much everywhere)
  7. - There should be max a single new line between:
  8. - statements
  9. - functions in a class
  10. - There should be two new lines between:
  11. - definitions in a module (e.g., between different classes)
  12. - There should be spaces where spaces should be and not where there shouldn't be:
  13. - a single space after a comma
  14. - a single space before and after for '=' when used as assignment
  15. - no spaces before and after for '=' for default values and keyword arguments.
  16. Comments should follow the google code style. This is so that we can generate documentation with sphinx (http://sphinxcontrib-napoleon.readthedocs.org/en/latest/)