[Numpy-discussion] numpy doc strings - a tool to list problem cases
by Colin J. Williams other posts by this author
Mar 7 2006 2:17PM messages near this date
Re: [Numpy-discussion] Power optimization branch merged to Numpy trunk
|
[Numpy-discussion] Is sum() slow?
Some of the docstrings have lines which are too long. Some names have
no associated docstring.
The effects of this are that, for the long lines, the PyDoc generated
documentation is difficult to read on a browser and,
for the missing cases, the generated docs are incomplete.
The question of how long is too long is a matter of personal choice. I
used 78 characters in the little script below that lists problem cases.
# to check numpy docs, for long and missing lines
import numpy
lst= dir(numpy)
lnMax= 78 # maximum number characters per line
print 'Report of missing docstrings and docstrings with lines that are
too long'
print
for nm in lst:
txt= eval('numpy.' + nm + '.__doc__')
if txt is None:
print nm, 'No docstring'
continue
lns= txt.split('\n')
for lnNo in range(len(lns)):
ln= lns[lnNo]
if len(ln) > lnMax:
print nm, 'Line#:', lnNo, 'Line Length:', len(ln)
z= 1
z= 1
Colin W.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@[...].net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion
|