summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2008-06-17 13:06:08 +0000
committerStefan van der Walt <stefan@sun.ac.za>2008-06-17 13:06:08 +0000
commit3a917b8d20bae0bec932019ffa3fa82ae6eabf5a (patch)
tree0801bc6905c4d2cfe25f52e0c807f7b5d06adb07
parent2bdd23ef6ddabcf24ef68f08fe7a737e4b52f355 (diff)
downloadnumpy-3a917b8d20bae0bec932019ffa3fa82ae6eabf5a.tar.gz
Update documentation standard.
-rw-r--r--numpy/doc/HOWTO_DOCUMENT.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/numpy/doc/HOWTO_DOCUMENT.txt b/numpy/doc/HOWTO_DOCUMENT.txt
index 9cde88d6f..5e4aeee37 100644
--- a/numpy/doc/HOWTO_DOCUMENT.txt
+++ b/numpy/doc/HOWTO_DOCUMENT.txt
@@ -339,6 +339,28 @@ The sections of the docstring are:
<http://www.scipy.org/Developer_Zone/ReferenceGuide>`_ is
available.
+Documenting classes
+-------------------
+
+Class docstring
+```````````````
+Use the same sections as outlined above (all except ``Returns`` are
+applicable). The constructor (``__init__``) should also be documented
+here.
+
+An ``Attributes`` section may be used to describe class variables::
+
+ Attributes
+ ----------
+ x : float
+ The X coordinate.
+ y : float
+ The Y coordinate.
+
+Method docstrings
+`````````````````
+Document these as you would any other function. Do not include
+``self`` in the list of parameters.
Common reST concepts
--------------------