Case Van Horsen <cas...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue9739>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to