Today's content:
-------------------------------------------
? Code indent with Colon
? Blank line delimited Code snippet
? Naming conventions for packages and modules
? Naming conventions for classes, objects
? Naming conventions for functions
? Code comments
Code indent with colon:
If num>5:
Print (' yes ');
Else
Print (' no ');
Blank line delimited code snippet:
1.if
2.while
3.for
4.def
5.class
Naming conventions for packages and modules:
1. Package
Requirements are uniform in lowercase.
2. Module
Requirements are uniform in lowercase.
Naming conventions for classes and objects:
1. Class
Strict camel style: Indexuserperson
2. Objects
Requirements are uniform in lowercase.
Naming conventions for functions:
Camel style: Indexuserperson
Code Comment:
1. Single-line Comment
# One line
# both Line
2. Multi-line annotations
‘‘‘
1) One line
2) Line
3) Three line
‘‘‘
"or" "to support web development in the future:
‘‘‘
<!doctype html>
<body></body>
‘‘‘
Python Coding specification