diff options
author | Greg Ward <gward@python.net> | 2002-06-09 00:22:07 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 2002-06-09 00:22:07 (GMT) |
commit | 47df99d57527a9b1a940e87fd4e0164caaf5d029 (patch) | |
tree | dc13941686c4912837f74aa581e568c19efb31f9 /Lib/textwrap.py | |
parent | 698d9f01c69997965994543978e42e7b13d31caa (diff) | |
download | cpython-47df99d57527a9b1a940e87fd4e0164caaf5d029.zip cpython-47df99d57527a9b1a940e87fd4e0164caaf5d029.tar.gz cpython-47df99d57527a9b1a940e87fd4e0164caaf5d029.tar.bz2 |
Make all of TextWrapper's options keyword args to the constructor.
Diffstat (limited to 'Lib/textwrap.py')
-rw-r--r-- | Lib/textwrap.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Lib/textwrap.py b/Lib/textwrap.py index cdcfe9b..d33219d 100644 --- a/Lib/textwrap.py +++ b/Lib/textwrap.py @@ -60,11 +60,15 @@ class TextWrapper: % string.lowercase) - def __init__ (self): - self.expand_tabs = True - self.replace_whitespace = True - self.fix_sentence_endings = False - self.break_long_words = True + def __init__ (self, + expand_tabs=True, + replace_whitespace=True, + fix_sentence_endings=False, + break_long_words=True): + self.expand_tabs = expand_tabs + self.replace_whitespace = replace_whitespace + self.fix_sentence_endings = fix_sentence_endings + self.break_long_words = break_long_words # -- Private methods ----------------------------------------------- |