Make initial_indent and subsequent_indent AnyStr in wrap() and fill() (#1662)

Leave them alone in TextWrap.__init__(), since I don't want to make the whole class generic.
This commit is contained in:
Guido van Rossum
2017-10-10 15:11:48 -07:00
committed by Matthias Kramm
parent 6d619e013c
commit 05ffb1f912

View File

@@ -39,8 +39,8 @@ class TextWrapper(object):
def wrap(
text: AnyStr,
width: int = ...,
initial_indent: str = ...,
subsequent_indent: str = ...,
initial_indent: AnyStr = ...,
subsequent_indent: AnyStr = ...,
expand_tabs: bool = ...,
replace_whitespace: bool = ...,
fix_sentence_endings: bool = ...,
@@ -52,8 +52,8 @@ def wrap(
def fill(
text: AnyStr,
width: int =...,
initial_indent: str = ...,
subsequent_indent: str = ...,
initial_indent: AnyStr = ...,
subsequent_indent: AnyStr = ...,
expand_tabs: bool = ...,
replace_whitespace: bool = ...,
fix_sentence_endings: bool = ...,