[SciPy-dev] Documenting classes

Robert Kern robert.kern at gmail.com
Mon Jun 16 15:18:31 EDT 2008


On Mon, Jun 16, 2008 at 12:51, Pierre GM <pgmdevlist at gmail.com> wrote:
> All,
> Is there some kind of official template for the documentation of numpy-related
> classes ?

Not per se, but most of the general outline of the function template
applies. Ignore Returns. I think I like having the __init__
constructor Parameters in the class docstring, but I will defer to
Stéfan's proclamation.

> In particular, what is the syntax for documenting special
> attributes/properties ?

I recommend adding a section like Parameters.

  Attributes
  ----------
  x : float
      The X coordinate.
  y : float
      The Y coordinate.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco


More information about the SciPy-Dev mailing list