[Python-checkins] cpython (merge 3.5 -> default): [merge from 3.5] issue27043 - Explain the inspect.cleandoc behavior on synopsis
senthil.kumaran
python-checkins at python.org
Sun May 29 23:38:01 EDT 2016
https://hg.python.org/cpython/rev/4d5a5d4e731d
changeset: 101566:4d5a5d4e731d
parent: 101564:71813a05e488
parent: 101565:c1eb32e183fd
user: Senthil Kumaran <senthil at uthcode.com>
date: Sun May 29 20:37:54 2016 -0700
summary:
[merge from 3.5] issue27043 - Explain the inspect.cleandoc behavior on synopsis line and other lines.
Patch contributed by Nathan Harold.
files:
Doc/library/inspect.rst | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -470,8 +470,12 @@
.. 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:
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list