[SciPy-dev] Documenting function-like classes

David Goldsmith d.l.goldsmith@gmail....
Sun Oct 25 16:37:59 CDT 2009


Quoting
http://docs.scipy.org/numpy/Questions+Answers/#how-to-document-the-class-numpy-ufuncs
:

" How to document (the class)
numpy.ufuncs<http://docs.scipy.org/numpy/Questions+Answers/#id13>

Though a class, numpy.ufuncs is presently documented, albeit not "to spec,"
as if it were a function; how *should* we document it?

*David Goldsmith, 2009-07-21*

   -

   I vote for as a class. As a consequence, I think, much of what's in there
   now can/should be disposed of: it more properly belongs in the docstrings of
   specific ufunc instances anyway, IMO.

   *David Goldsmith, 2009-07-21*
   -

   As a function. This goes for all classes that pretend to be functions
   IMHO. If a class has a __call__ method for example, it needs a Returns
   section. Pydocweb will complain right now, but this can be fixed.
   - Ralf Gommers, 2009-10-25*

"

What *is* the design motivation behind having a function-like class anyway?

DG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20091025/40f160b3/attachment.html 


More information about the Scipy-dev mailing list