[SciPy-dev] ndimage - docfiller and output_type

Ralf Gommers ralf.gommers@googlemail....
Sun Oct 25 16:33:49 CDT 2009

On Sun, Oct 25, 2009 at 8:20 PM, Matthew Brett <matthew.brett@gmail.com>wrote:

> Ah - now you're asking me to think, on a Sunday morning.
> Sorry. Hope it wasn't too painful :)

> scipy.stats (sorry I read this fast) does a similar thing by defining
> an object to contain a particular type of distribution function (e.g
> rv_continuous), and you can pass things like the function short and
> long names, allowable input shape and any extra text you want to add
> to the docstring, and the object __init__ fills the docstring for you.
> Okay, now it makes sense to me. The scipy.stats docs are pretty much
completely auto-generated, even the examples. Then the "extradoc" keyword
contains extra info that is just tacked on at the end (below the examples).
There seems to be room for improvement there.

Docfiller allows you to enter any repeated piece of text, requiring
> you only to define the %(text_here)s placeholders.  scipy.stats in
> docfiller flavor would be:
> docdict = {'name': 'normal', 'longname': 'the Gaussian (normal)
> distribution'} # etc
> scipy.stats does some processing of the input parameters like shape,
> to determine the docstring, but that could easily be put in your
> decorator.
> So, I'm not sure docfiller is the only or best solution, but it looks
> like something like it recurs in the code, and I think it could work
> for scipy.stats...

Thanks Matthew. Searching for how other people/projects solve this same
problem I found nothing much fancier than docfiller, so I think I will try
to get an idea first of how much work it will be to change the scipy.stats
docs to use docfiller throughout.

Then of course it would be good to hear from Pauli roughly how much work it
would be to support this in pydocweb. The ticket says "rewrite of
pydoc-tool.py" so it may be non-trivial....

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

More information about the Scipy-dev mailing list