]> arthur.barton.de Git - bup.git/blob - CODINGSTYLE
do_bloom(): remove unused "count" variable
[bup.git] / CODINGSTYLE
1 Python code follows PEP8 [1] with regard to coding style and PEP257 [2] with
2 regard to docstring style. Multi-line docstrings should have one short summary
3 line, followed by a blank line and a series of paragraphs. The last paragraph
4 should be followed by a line that closes the docstring (no blank line in
5 between). Here's an example from lib/bup/helpers.py:
6
7 def unlink(f):
8     """Delete a file at path 'f' if it currently exists.
9
10     Unlike os.unlink(), does not throw an exception if the file didn't already
11     exist.
12     """
13     #code...
14
15 Module-level docstrings follow exactly the same guidelines but without the
16 blank line between the summary and the details.
17
18
19 The C implementations should follow the kernel/git coding style [3].
20
21
22 [1]:http://www.python.org/dev/peps/pep-0008/
23 [2]:http://www.python.org/dev/peps/pep-0257/
24 [3]:http://www.kernel.org/doc/Documentation/CodingStyle