~usc-isi/nova/extra_specs_sched

« back to all changes in this revision

Viewing changes to HACKING

  • Committer: Tarmac
  • Author(s): termie
  • Date: 2011-04-20 18:56:20 UTC
  • mfrom: (897.3.2 more_docstring)
  • Revision ID: tarmac-20110420185620-xiau7m5gvks0vtoh
attempts to make the docstring rules clearer

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
 
51
51
Docstrings
52
52
----------
53
 
  """Summary of the function, class or method, less than 80 characters.
54
 
 
55
 
  New paragraph after newline that explains in more detail any general
56
 
  information about the function, class or method. After this, if defining
57
 
  parameters and return types use the Sphinx format. After that an extra
58
 
  newline then close the quotations.
 
53
  """A one line docstring looks like this and ends in a period."""
 
54
 
 
55
 
 
56
  """A multiline docstring has a one-line summary, less than 80 characters.
 
57
 
 
58
  Then a new paragraph after a newline that explains in more detail any
 
59
  general information about the function, class or method. Example usages
 
60
  are also great to have here if it is a complex class for function. After
 
61
  you have finished your descriptions add an extra newline and close the
 
62
  quotations.
59
63
 
60
64
  When writing the docstring for a class, an extra line should be placed
61
65
  after the closing quotations. For more in-depth explanations for these
62
66
  decisions see http://www.python.org/dev/peps/pep-0257/
63
67
 
 
68
  If you are going to describe parameters and return values, use Sphinx, the
 
69
  appropriate syntax is as follows.
 
70
 
64
71
  :param foo: the foo parameter
65
72
  :param bar: the bar parameter
66
73
  :returns: description of the return value