[SciPy-dev] ndimage - docfiller and output_type
Wed Oct 28 09:41:33 CDT 2009
Thanks for the feedback Josef.
On Wed, Oct 28, 2009 at 2:52 PM, <firstname.lastname@example.org> wrote:
> Just some quick comments (I will look more after Friday)
I don't see a big break with the current system, but the templating
> system looks cleaner.
Well I did not want to be too radical, just make it a bit more flexible and
> One difference: standard help doesn't get the substitution in the docstring
> >>> help(maxwell)
> >>> maxwell.__doc__
> >>> help(stats.distributions.norm)
> no difference in the docstring of the class:
> >>> print stats.distributions.norm_gen.__doc__
> >>> print distname_gen.__doc__
> >>> print maxwell_gen.__doc__
> Is it possible to attach the docstring to the distribution (sub) class
> when it is instantiated, e.g.
> self.__class__.__doc__ = generated docs # I didn't try this
That works, good point. Fixes the python help() as well.
> (The current dist_gen classes are missing a __init__, so the class
> doesn't get any of the information.)
> So, I think overall it looks pretty good.
> Does it really make the life for the doceditor easier?
It should do in the future, but right now that is just an added benefit.
More important is that you just get better docstrings.
> The template substitution is still in the rvclass.__init__
This can disappear once all classes have their own docstring. I was being
conservative by keeping the old system as a backup.
If you would be happy if I gave each `_gen` class a default docstring based
on the new system, and completely remove the templates in
rv_continuous/rv_discrete, I will do that.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Scipy-dev