diff options
author | Greg Ward <gward@python.net> | 2003-05-08 02:12:35 +0000 |
---|---|---|
committer | Greg Ward <gward@python.net> | 2003-05-08 02:12:35 +0000 |
commit | 86e1790cad8bb85faad5e91e1a46dc7c6373d20a (patch) | |
tree | 42b226f6200945ea50ba38611aa950d7500a9b88 /Lib/textwrap.py | |
parent | 8f6329c54768de2f00cb567dbcd9302d0a9f0f6e (diff) | |
download | cpython-git-86e1790cad8bb85faad5e91e1a46dc7c6373d20a.tar.gz |
Clarify the dedent() example a bit by indenting the input lines unevenly.
Diffstat (limited to 'Lib/textwrap.py')
-rw-r--r-- | Lib/textwrap.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/textwrap.py b/Lib/textwrap.py index 754b037323..f878e52d19 100644 --- a/Lib/textwrap.py +++ b/Lib/textwrap.py @@ -325,11 +325,11 @@ def dedent(text): def test(): # end first line with \ to avoid the empty line! s = '''\ - Hey - there + hello + world ''' - print repr(s) # prints ' Hey\n there\n ' - print repr(dedent(s)) # prints 'Hey\nthere\n' + print repr(s) # prints ' hello\n world\n ' + print repr(dedent(s)) # prints 'hello\n world\n' """ lines = text.expandtabs().split('\n') margin = None |