summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/textwrap.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/textwrap.py b/Lib/textwrap.py
index 552fef6..af7a48a 100644
--- a/Lib/textwrap.py
+++ b/Lib/textwrap.py
@@ -244,8 +244,10 @@ class TextWrapper:
# Convenience interface
-def wrap(text, width):
- return TextWrapper(width=width).wrap(text)
+def wrap(text, width=70, **kwargs):
+ w = TextWrapper(width=width, **kwargs)
+ return w.wrap(text)
-def fill(text, width, initial_tab="", subsequent_tab=""):
- return TextWrapper(width=width).fill(text, initial_tab, subsequent_tab)
+def fill(text, width=70, initial_tab="", subsequent_tab="", **kwargs):
+ w = TextWrapper(width=width, **kwargs)
+ return w.fill(text, initial_tab, subsequent_tab)