Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ebd84e3

Browse files
committed
issue27043 - Explain the inspect.cleandoc behavior on synopsis line and other lines.
Patch contributed by Nathan Harold.
1 parent 8d56c02 commit ebd84e3

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Doc/library/inspect.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,12 @@ Retrieving source code
489489
.. function:: cleandoc(doc)
490490

491491
Clean up indentation from docstrings that are indented to line up with blocks
492-
of code. Any whitespace that can be uniformly removed from the second line
493-
onwards is removed. Also, all tabs are expanded to spaces.
492+
of code.
493+
494+
All leading whitespace is removed from the first line. Any leading whitespace
495+
that can be uniformly removed from the second line onwards is removed. Empty
496+
lines at the beginning and end are subsequently removed. Also, all tabs are
497+
expanded to spaces.
494498

495499

496500
.. _inspect-signature-object:

0 commit comments

Comments
 (0)