Skip to content

bpo-44544: add textwrap placeholder arg #27671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Doc/library/textwrap.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ functions should be good enough; otherwise, you should use an instance of
subsequent_indent="", expand_tabs=True, \
replace_whitespace=True, fix_sentence_endings=False, \
break_long_words=True, drop_whitespace=True, \
break_on_hyphens=True, tabsize=8, max_lines=None)
break_on_hyphens=True, tabsize=8, max_lines=None, \
placeholder=' [...]')

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

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