Skip to content

bpo-30754 #14469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Doc/library/textwrap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ functions should be good enough; otherwise, you should use an instance of
equal: the lines ``" hello"`` and ``"\thello"`` are considered to have no
common leading whitespace.

Lines containing only whitespace are ignored in the input and normalized to a
single newline character in the output.

For example::

def test():
Expand Down
6 changes: 3 additions & 3 deletions Lib/textwrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down