python官网给出的编程规范
1.Use 4-space indentation, and no tabs.
2.Wrap lines so that they don’t exceed 79 characters.
3.Use blank lines to separate functions and classes, and larger blocks of code inside functions.
4.When possible, put comments on a line of their own.
5.Use docstrings.
6.Use spaces around operators and after commas, but not directly inside bracketing constructs: a = f(1, 2) + g(3, 4).
7.Name your classes and functions consistently; the convention is to use CamelCase for classes and lower_case_with_underscores for functions and methods. Always use self as the name for the first method argument (see A First Look at Classes for more on classes and methods).
8.Don’t use fancy encodings if your code is meant to be used in international environments. Python’s default, UTF-8, or even plain ASCII work best in any case.
9.Likewise, don’t use non-ASCII characters in identifiers if there is only the slightest chance people speaking a different language will read or maintain the code