From c593056744559102f79f82c8b87da05d9a0450ca Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 16 Aug 2013 22:31:12 +0200 Subject: Fix the default placeholder in textwrap.shorten() to be " [...]". For some reason I forgot to do it before committing the patch in issue #18585. --- Lib/textwrap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Lib/textwrap.py') diff --git a/Lib/textwrap.py b/Lib/textwrap.py index b19f124c2f..27ebc16e16 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) -- cgit v1.2.1