summaryrefslogtreecommitdiffstats
path: root/Doc/library/inspect.rst
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2016-05-30 03:37:54 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2016-05-30 03:37:54 (GMT)
commit96ebb8431a5775050e5e93bf0c3c5240673d7ba1 (patch)
tree6821a03f8a4c63631deef31700df41d7529d4c00 /Doc/library/inspect.rst
parenteb6cd742e5211b9e11add4f00c9133caf1b46fb6 (diff)
parentebd84e342c830824f585ef334ff52aaf26fa8ac6 (diff)
downloadcpython-96ebb8431a5775050e5e93bf0c3c5240673d7ba1.zip
cpython-96ebb8431a5775050e5e93bf0c3c5240673d7ba1.tar.gz
cpython-96ebb8431a5775050e5e93bf0c3c5240673d7ba1.tar.bz2
[merge from 3.5] issue27043 - Explain the inspect.cleandoc behavior on synopsis line and other lines.
Patch contributed by Nathan Harold.
Diffstat (limited to 'Doc/library/inspect.rst')
-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 11766b7..3994850 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -470,8 +470,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: