mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
bpo-30754: Document textwrap.dedent blank line behavior. (GH-14469)
* Added documentation for textwrap.dedent behavior. * Remove an obsolete note about pre-2.5 behavior from the docstring.
This commit is contained in:
parent
95da310078
commit
eb97b9211e
2 changed files with 6 additions and 3 deletions
|
|
@ -420,9 +420,9 @@ def dedent(text):
|
|||
|
||||
Note that tabs and spaces are both treated as whitespace, but they
|
||||
are not equal: the lines " hello" and "\\thello" are
|
||||
considered to have no common leading whitespace. (This behaviour is
|
||||
new in Python 2.5; older versions of this module incorrectly
|
||||
expanded tabs before searching for common leading whitespace.)
|
||||
considered to have no common leading whitespace.
|
||||
|
||||
Entirely blank lines are normalized to a newline character.
|
||||
"""
|
||||
# Look for the longest leading string of spaces and tabs common to
|
||||
# all lines.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue