[Numpy-discussion] Why are ufunc docstrings useless?
Charles R Harris
Thu May 8 22:17:42 CDT 2008
On Thu, May 8, 2008 at 9:12 PM, Charles R Harris <firstname.lastname@example.org>
> On Thu, May 8, 2008 at 9:07 PM, Robert Kern <email@example.com> wrote:
>> On Thu, May 8, 2008 at 9:52 PM, Anne Archibald
>> <firstname.lastname@example.org> wrote:
>> > Thanks! Done add, reduce, outer, and reduceat. What about __call__?
>> If anyone knows enough to explicitly request a docstring from
>> __call__, they already know what it does.
> It's easier/better to do this in numpy/add_newdocs.py. For example:
> In : from numpy.lib import add_newdoc as add
> In : add('numpy.core','ufunc',('reduce','hello world'))
> In : ufunc.reduce.__doc__
> Out: 'hello world'
> You don't have to clutter up the c sources and you can use """ """, instead
> of putting all those newlines in.
Also, not all c compilers will join strings on separate lines. You need to
add explicit continuation backslashes.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion