summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortermie <github@anarkystic.com>2011-03-28 10:46:02 -0700
committertermie <github@anarkystic.com>2011-03-28 10:46:02 -0700
commit36e1510e4ad4a83bb062cdd82dc91d4ea15d1c5e (patch)
treed6fdcd4aa2ce9ab93e30367c9050ff3944a77254
parentc3c86f994413792cf582df86cf5e16f788005bed (diff)
downloadnova-36e1510e4ad4a83bb062cdd82dc91d4ea15d1c5e.tar.gz
nova-36e1510e4ad4a83bb062cdd82dc91d4ea15d1c5e.tar.xz
nova-36e1510e4ad4a83bb062cdd82dc91d4ea15d1c5e.zip
HACKING update for docstrings
-rw-r--r--HACKING15
1 files changed, 10 insertions, 5 deletions
diff --git a/HACKING b/HACKING
index e58d60e58..95afc0f74 100644
--- a/HACKING
+++ b/HACKING
@@ -50,17 +50,22 @@ Human Alphabetical Order Examples
Docstrings
----------
- """Summary of the function, class or method, less than 80 characters.
+ """A one line docstring looks like this and ends in a period."""
- New paragraph after newline that explains in more detail any general
- information about the function, class or method. After this, if defining
- parameters and return types use the Sphinx format. After that an extra
- newline then close the quotations.
+
+ """A multiline docstring has a one-line summary, less than 80 characters.
+
+ Then a new paragraph after a newline that explains in more detail any
+ general information about the function, class or method. Example usages
+ are also great to have here if it is a complex class for function.
When writing the docstring for a class, an extra line should be placed
after the closing quotations. For more in-depth explanations for these
decisions see http://www.python.org/dev/peps/pep-0257/
+ If you are going to describe parameters and return values, use Sphinx, the
+ appropriate syntax is as follows.
+
:param foo: the foo parameter
:param bar: the bar parameter
:returns: description of the return value