Skip to content

Commit c1f327f

Browse files
bpo-44544: add textwrap placeholder arg (GH-27671)
(cherry picked from commit cb7874f) Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
1 parent a5b7678 commit c1f327f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/textwrap.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ functions should be good enough; otherwise, you should use an instance of
2121
subsequent_indent="", expand_tabs=True, \
2222
replace_whitespace=True, fix_sentence_endings=False, \
2323
break_long_words=True, drop_whitespace=True, \
24-
break_on_hyphens=True, tabsize=8, max_lines=None)
24+
break_on_hyphens=True, tabsize=8, max_lines=None, \
25+
placeholder=' [...]')
2526

2627
Wraps the single paragraph in *text* (a string) so every line is at most
2728
*width* characters long. Returns a list of output lines, without final
@@ -39,7 +40,7 @@ functions should be good enough; otherwise, you should use an instance of
3940
replace_whitespace=True, fix_sentence_endings=False, \
4041
break_long_words=True, drop_whitespace=True, \
4142
break_on_hyphens=True, tabsize=8, \
42-
max_lines=None)
43+
max_lines=None, placeholder=' [...]')
4344

4445
Wraps the single paragraph in *text*, and returns a single string containing the
4546
wrapped paragraph. :func:`fill` is shorthand for ::

0 commit comments

Comments
 (0)