[docs] [issue9739] Output of help(...) is wider than 80 characters
Case Van Horsen
report at bugs.python.org
Fri Sep 3 05:25:50 CEST 2010
Case Van Horsen <casevh at gmail.com> added the comment:
According to PEP 7, the first line of the doc string should contain the signature of the function, then there should be a blank line, and then the rest of the doc string. There may be tools that extract the signature line. The patch just decreases the line length of the remaining lines of the doc string so they don't wrap when displayed on an 80 character wide terminal window.
For an example, look at the text for modf(...) in help(math).
I just noticed that the math module uses "modf(x)" for the signature line but PEP 7 recommends including the return type, say "modf(x) -> (frac, int)".
The simplest change would be to fix the wrapping issue and leave the signature line alone. It would be more effort to make all the doc strings PEP 7 compliant by standardizing the signature line to include the return type.
I'm willing to work through the standard library and create patches for either option.
Python tracker <report at bugs.python.org>
More information about the docs