From 739b3737f249acb3f4772b732fca2180717cbcba Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Sun, 29 May 2016 20:38:55 -0700 Subject: [PATCH] issue27043 - Explain the inspect.cleandoc behavior on synopsis line and other lines. Patch contributed by Nathan Harold. --- Doc/library/inspect.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index 50d59e1156..1964f7145e 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -443,8 +443,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. .. versionadded:: 2.6 -- 2.50.1