[SciPy-Dev] distribution docstring generation

David Goldsmith d.l.goldsmith at gmail.com
Sat May 15 01:03:41 EDT 2010


On Fri, May 14, 2010 at 8:29 PM, Ralf Gommers
<ralf.gommers at googlemail.com>wrote:

>
>
> On Fri, May 14, 2010 at 11:58 PM, <josef.pktd at gmail.com> wrote:
>
>> On Fri, May 14, 2010 at 11:26 AM, Ralf Gommers
>> <ralf.gommers at googlemail.com> wrote:
>> >> Bug, undesired feature or feature request ?
>> >> I have no idea whether or how the doceditor can blacklist a function
>> >> (or class instance) so it cannot be edited or so it redirects to the
>> >> correct location.
>> >
>> > Don't know either, but it would be very useful to be able to 'lock'
>> pages.
>> > Since I don't think that's possible right now, maybe a capitalized note
>> on
>> > each page is in order.
>>
>> Is there a way to add a note?
>>
>
> I meant in the comment field.
>
>
>> I also thought, setting all of the distribution instances to
>> "unimportant" would be useful as a short run measure, but there are
>> too many of them for me to do page-by-page by hand
>>
>> One more alternative, "unimportant" is the lowest category for page
>> editing, maybe it is possible to add a category "DO NOT EDIT"  if we
>> cannot look the page down.
>>
>> Either one of the above would help. I guess Pauli has to decide what is
> easiest.
>
> Ralf
>

I'm not entirely clear on the template problem to which you refer, but
perhaps looking at what I did for Polynomial.deriv (actually, all of
Polynomial's and Chebyshev's methods) might help?  In particular, both of
these classes are generated from a template, and so things in the docstring
that need to be substituted with the "value" of the template (i.e., either
Polynomial or Chebyshev) are named w/ "$name" (and references to similar
functions that use only a portion of the name use a ${nick}<rest of function
name> syntax); I don't know if this a universal feature of the Python
templating system, however - Charles H.?

Then, I included the following note in each method's discussion section:
"This docstring is written for and needs to be placed in this module's class
template, located in numpy/polynomial/polytemplate.py; its use therein
obviates the need of placement in any other Polynomial-derived class."  Is
(something like) this what you're after?  (Yes, I know it would be nice if
we didn't have to do this manually, but w/ copy-and-paste, it's not that big
a deal).

DG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20100514/380e4eab/attachment.html>


More information about the SciPy-Dev mailing list