functions should be good enough; otherwise, you should use an instance of
:class:`TextWrapper` for efficiency.
-.. function:: wrap(text, width=70, **kwargs)
+.. function:: wrap(text, width=70, *, initial_indent="", \
+ 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)
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
:func:`wrap` behaves.
-.. function:: fill(text, width=70, **kwargs)
+.. function:: fill(text, width=70, *, initial_indent="", \
+ 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)
Wraps the single paragraph in *text*, and returns a single string containing the
wrapped paragraph. :func:`fill` is shorthand for ::
:func:`wrap`.
-.. function:: shorten(text, width, **kwargs)
+.. function:: shorten(text, width, *, fix_sentence_endings=False, \
+ break_long_words=True, break_on_hyphens=True, \
+ placeholder=' [...]')
Collapse and truncate the given *text* to fit in the given *width*.
.. versionadded:: 3.4
-
.. function:: dedent(text)
Remove any common leading whitespace from every line in *text*.