Coding Style
Code organization
  1. #!/usr/bin/python
  2. docstring
  3. authorship information
    • __author__
    • __copyright__
    • __credits__
    • __license__
    • __version__
    • __maintainer__
    • __email__
    • __status__, one of Prototype, Development, or Production
  4. Import built-in modules, followed by third-party modules, followed by any changes to the path and your own modules
Google Style
  • Import
  • Exception
  • Global variables
  • Comprehensions & Generator Expressions
  • Conditional Expressions
  • Default Argument Values
  • Properties
  • True/False evaluations
  • Python Style Rules
  • PEP 8 -- Style Guide for Python Code
  • Code Lay-out
  • String Quotes, for triple-quoted strings, always use double quote characters to be consistent with the docstring convention in PEP 257
  • Whitespace in Expressions and Statements
  • Comments
  • Naming Conventions
  • Reference
  • Google Python Style Guide
  • PEP 8
  • Code organization