summaryrefslogtreecommitdiffstats
path: root/Doc/library/textwrap.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-08-16 20:31:12 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-08-16 20:31:12 (GMT)
commitc593056744559102f79f82c8b87da05d9a0450ca (patch)
treefe06dd9c9f8ab35f2d8d59a99c8e488b4655b23a /Doc/library/textwrap.rst
parent05eafa887b8c8046c0045f53eac1383caaed2b6e (diff)
downloadcpython-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 'Doc/library/textwrap.rst')
-rw-r--r--Doc/library/textwrap.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/textwrap.rst b/Doc/library/textwrap.rst
index 486d5db..6ac1e77 100644
--- a/Doc/library/textwrap.rst
+++ b/Doc/library/textwrap.rst
@@ -40,7 +40,7 @@ functions should be good enough; otherwise, you should use an instance of
:func:`wrap`.
-.. function:: shorten(text, width=70, *, placeholder=" (...)")
+.. function:: shorten(text, width=70, *, placeholder=" [...]")
Collapse and truncate the given text to fit in the given width.
@@ -51,7 +51,7 @@ functions should be good enough; otherwise, you should use an instance of
>>> textwrap.shorten("Hello world!", width=12)
'Hello world!'
>>> textwrap.shorten("Hello world!", width=11)
- 'Hello (...)'
+ 'Hello [...]'
>>> textwrap.shorten("Hello world", width=10, placeholder="...")
'Hello...'
@@ -268,7 +268,7 @@ hyphenated words; only then will long words be broken if necessary, unless
containing the wrapped paragraph.
- .. function:: shorten(text, *, placeholder=" (...)")
+ .. function:: shorten(text, *, placeholder=" [...]")
Collapse and truncate the given text to fit in :attr:`width`
characters.