Changes

Jump to navigation Jump to search
no edit summary
Line 1: Line 1: −
* The first line of each file shoud be #!/usr/bin/env python. This makes it possible to run the file as a script invoking the interpreter implicitly, e.g. in a CGI context.
+
* The first two lines of each file shoud be  
 +
<nowiki># -*- coding: utf-8 -*-
 +
#!/usr/bin/env</nowiki>
   −
* Next should be the docstring with a description. If the description is long, the first line should be a short summary that makes sense on its own, separated from the rest by a newline.
+
* Next should be the docstring with a description. If the description is long, the first line should be a short summary that makes sense on its own, separated from the rest by a newline.<br />
 +
https://www.python.org/dev/peps/pep-0257/
 
* All code, including import statements, should follow the docstring. Otherwise, the docstring will not be recognized by the interpreter, and you will not have access to it in interactive sessions (i.e. through obj.__doc__) or when generating documentation with automated tools.
 
* All code, including import statements, should follow the docstring. Otherwise, the docstring will not be recognized by the interpreter, and you will not have access to it in interactive sessions (i.e. through obj.__doc__) or when generating documentation with automated tools.
  

Navigation menu