summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2016-05-30 03:36:58 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2016-05-30 03:36:58 (GMT)
commitebd84e342c830824f585ef334ff52aaf26fa8ac6 (patch)
treeb9f235c510d32d047e342fdb0834012a1b760a3b /Doc
parent8d56c026a5dd724318be005465366d5140fa6fe7 (diff)
downloadcpython-ebd84e342c830824f585ef334ff52aaf26fa8ac6.zip
cpython-ebd84e342c830824f585ef334ff52aaf26fa8ac6.tar.gz
cpython-ebd84e342c830824f585ef334ff52aaf26fa8ac6.tar.bz2
issue27043 - Explain the inspect.cleandoc behavior on synopsis line and other lines.
Patch contributed by Nathan Harold.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/inspect.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index 59fd937..ff628de 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -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: