Google Python Style Guide
Google Python Style Guide Table of Contents 1 Background 2 Python Language Rules 2.1 Lint 2.2 Imports 2.3 Packages 2.4 Exceptions 2.5 Mutable Global State 2.6 Nested/Local/Inner Classes and Functions 2.7 Comprehensions & Generator Expressions 2.8 Default Iterators and Operators 2.9 Generators 2.10 Lambda Functions 2.11 Conditional Expressions 2.12 Default Argument Values 2.13 Properties 2.14 True/False Evaluations 2.16 Lexical Scoping 2.17 Function and Method Decorators 2.18 Threading 2.19 Power Features 2.20 Modern Python: from __future__ imports 2.21 Type Annotated Code 3 Python Style Rules 3.1 Semicolons 3.2 Line length 3.3 Parentheses 3.4 Indentation 3.4.1 Trailing commas in sequences of items? 3.5 Blank Lines 3.6 Whitespace 3.7 Shebang Line 3.8 Comments and Docstrings 3.8.1 Docstrings 3.8.2 Modules 3.8.2.1 Test modules 3.8.3 Functions and Methods 3.8.3.1 Overridden Methods 3.8.4 Classes 3.8.5 Block and Inline Comments 3.8.6 Punctuation, Spelling, and Grammar 3.10 Strings...