[SciPy-dev] Doc-ing classes and data attributes
Sat Jun 20 18:23:39 CDT 2009
Ok, a couple follow-up questions: where precisely should documentation of __init__, and the Attributes and Methods sections (when needed) go? In other words, docstringstandard says, "Use the same sections as outlined [for Functions]," but as Functions don't have __init__, Attributes, or Methods, it is unclear where in the "above" template these new items should go.
Also, since __init__ is a method, I assume it should itself be documented like any other method, i.e., w/ a definition, one line desc., multi-line desc., parameters section, etc. To my mind, to avoid clutter and excessively long docstrings, it seems like it should be documented separately; but then perhaps what is meant is that documenting the class is really documenting its __init__?
--- On Fri, 6/19/09, Stéfan van der Walt <firstname.lastname@example.org> wrote:
> From: Stéfan van der Walt <email@example.com>
> Subject: Re: [SciPy-dev] Doc-ing classes and data attributes
> To: "SciPy Developers List" <firstname.lastname@example.org>
> Date: Friday, June 19, 2009, 11:19 PM
> Hi David
> 2009/6/20 David Goldsmith <email@example.com>:
> > Hi! The template http://projects.scipy.org/numpy/browser/trunk/doc/example.py#L37
> for documenting things doesn't seem like a very good
> template for documenting objects, e.g., ufunc, and data (as
> opposed to method) attributes of objects, e.g.,
> ndarray.dtype. Are there other templates for these
> elsewhere? Thanks!
> Have a look at
> under the section "Documenting Classes". Is that what
> you're looking for?
> Scipy-dev mailing list
More information about the Scipy-dev