diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-08-16 20:31:12 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-08-16 20:31:12 (GMT) |
commit | c593056744559102f79f82c8b87da05d9a0450ca (patch) | |
tree | fe06dd9c9f8ab35f2d8d59a99c8e488b4655b23a /Lib/textwrap.py | |
parent | 05eafa887b8c8046c0045f53eac1383caaed2b6e (diff) | |
download | cpython-c593056744559102f79f82c8b87da05d9a0450ca.zip cpython-c593056744559102f79f82c8b87da05d9a0450ca.tar.gz cpython-c593056744559102f79f82c8b87da05d9a0450ca.tar.bz2 |
Fix the default placeholder in textwrap.shorten() to be " [...]".
For some reason I forgot to do it before committing the patch in issue #18585.
Diffstat (limited to 'Lib/textwrap.py')
-rw-r--r-- | Lib/textwrap.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/textwrap.py b/Lib/textwrap.py index b19f124..27ebc16 100644 --- a/Lib/textwrap.py +++ b/Lib/textwrap.py @@ -19,7 +19,7 @@ __all__ = ['TextWrapper', 'wrap', 'fill', 'dedent', 'indent'] # since 0xa0 is not in range(128). _whitespace = '\t\n\x0b\x0c\r ' -_default_placeholder = ' (...)' +_default_placeholder = ' [...]' class TextWrapper: """ @@ -376,7 +376,7 @@ def shorten(text, width, *, placeholder=_default_placeholder, **kwargs): >>> textwrap.shorten("Hello world!", width=12) 'Hello world!' >>> textwrap.shorten("Hello world!", width=11) - 'Hello (...)' + 'Hello [...]' """ w = TextWrapper(width=width, **kwargs) return w.shorten(text, placeholder=placeholder) |