mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Make all of TextWrapper's options keyword args to the constructor.
This commit is contained in:
parent
698d9f01c6
commit
47df99d575
1 changed files with 9 additions and 5 deletions
|
@ -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 -----------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue