Python Style Guide

--HIDE--

Introduction

Python Language Rules

Lint Imports Packages Exceptions Global Variables Nested/Local/Inner Classes and Functions List Comprehensions Default Iterators and Operators Generators Lambda Functions Conditional Expressions Default Argument Values Properties True/False Evaluations Deprecated Language Features Lexical Scoping Function and Method Decorators Threading Power Features

Python Style Rules

Semicolons Line Length Parentheses Indentation Blank Lines Whitespace Shebang Line Comments Classes Strings Files and Sockets TODO Comments Imports Formatting Statements Access Control Naming Main

Django Style Rules

Models Views Forms Urls

Deprecated Language Features

Use string methods instead of the string module where possible. Use function call syntax instead of apply. Use list comprehensions and for loops instead of filter and map when the function argument would have been an inlined lambda anyway. Use for loops instead of reduce.

results matching ""

    No results matching ""