summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2016-05-30 03:38:55 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2016-05-30 03:38:55 (GMT)
commit739b3737f249acb3f4772b732fca2180717cbcba (patch)
tree2dc943318adc3335ff2e890749ec3ddd3c453c0c
parentb44c4520d965788aa6d24edab36d89103b0a1aea (diff)
downloadcpython-739b3737f249acb3f4772b732fca2180717cbcba.zip
cpython-739b3737f249acb3f4772b732fca2180717cbcba.tar.gz
cpython-739b3737f249acb3f4772b732fca2180717cbcba.tar.bz2
issue27043 - Explain the inspect.cleandoc behavior on synopsis line and other lines.
Patch contributed by Nathan Harold.
-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 50d59e1..1964f71 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