mirror of
https://github.com/python/cpython.git
synced 2025-11-03 19:34:08 +00:00
issue27043 - Explain the inspect.cleandoc behavior on synopsis line and other lines.
Patch contributed by Nathan Harold.
This commit is contained in:
parent
8d56c026a5
commit
ebd84e342c
1 changed files with 6 additions and 2 deletions
|
|
@ -489,8 +489,12 @@ Retrieving source code
|
||||||
.. function:: cleandoc(doc)
|
.. function:: cleandoc(doc)
|
||||||
|
|
||||||
Clean up indentation from docstrings that are indented to line up with blocks
|
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
|
of code.
|
||||||
onwards is removed. Also, all tabs are expanded to spaces.
|
|
||||||
|
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:
|
.. _inspect-signature-object:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue