]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
issue27043 - Explain the inspect.cleandoc behavior on synopsis line and other lines.
authorSenthil Kumaran <senthil@uthcode.com>
Mon, 30 May 2016 03:36:58 +0000 (20:36 -0700)
committerSenthil Kumaran <senthil@uthcode.com>
Mon, 30 May 2016 03:36:58 +0000 (20:36 -0700)
Patch contributed by Nathan Harold.

Doc/library/inspect.rst

index 59fd93744a476e147c4701fb7822f4a4b67fc5d1..ff628de1bd50c434509e6acf7456ebb7b38e0365 100644 (file)
@@ -489,8 +489,12 @@ Retrieving source code
 .. function:: cleandoc(doc)
 
    Clean up indentation from docstrings that are indented to line up with blocks
-   of code.  Any whitespace that can be uniformly removed from the second line
-   onwards is removed.  Also, all tabs are expanded to spaces.
+   of code.
+
+   All leading whitespace is removed from the first line.  Any leading whitespace
+   that can be uniformly removed from the second line onwards is removed.  Empty
+   lines at the beginning and end are subsequently removed.  Also, all tabs are
+   expanded to spaces.
 
 
 .. _inspect-signature-object: