[Numpy-discussion] numpy doc strings - a tool to list problem cases
Colin J. Williams
cjw at sympatico.ca
Tue Mar 7 14:17:03 CST 2006
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
lnMax= 78 # maximum number characters per line
print 'Report of missing docstrings and docstrings with lines that are
for nm in lst:
txt= eval('numpy.' + nm + '.__doc__')
if txt is None:
print nm, 'No docstring'
for lnNo in range(len(lns)):
if len(ln) > lnMax:
print nm, 'Line#:', lnNo, 'Line Length:', len(ln)
More information about the Numpy-discussion