6. Notes:
Line comments start with #, multiline comments use three single quotation marks ("') or three double quotation marks (" "), comments do not need to be aligned
Three quotes allow programmers to free themselves from the mire of quotes and special strings, keeping the so-called WYSIWYG format from beginning to finish.
A typical use case is that when you need a piece of HTML or SQL, a special string escape is cumbersome when you use a string combination.
7. Naming style:
Write Java on the hump , write the python is underlined
module Name: lowercase letters, between words with _ Division;
Package Name: Same as module name
Ad_stats Package.ad_stats
class Name: capitalize the first letter of the word
Adstatus
global variable names ( class variables, equivalent to static variables in Java ): uppercase letters, dividing between words with _
Number
Normal variables: lowercase letters, between words with _ Division
instance variable: starts with _, and the other is the same as the normal variable
_price
Private instance variable ( external access error ): Starts with __ (2 underscore), and the other is the same as the normal variable
__private_var
Proprietary variables: __ Begins, __ ends, and is typically a python-owned variable, not named in this way
__doc__ __class__
Common functions: as with normal variables:
Get_name () count_number ()
Private Function ( external access error ): Starts with __ (2 underscore), and the other is the same as the normal function
__get_name ()
For more information, please refer to: http://www.cnblogs.com/Maker-Liu/p/5528213.html
Python Note 3: Comment naming style