Add correct optional default start/end parameters to str count, find, index, rfind, rindex. (#1109)

fixes #1108
This commit is contained in:
George King
2017-03-28 13:11:50 -04:00
committed by Guido van Rossum
parent 03bfcee0b8
commit 18cc2cbf8c
2 changed files with 10 additions and 10 deletions

View File

@@ -301,14 +301,14 @@ class str(basestring, Sequence[str]):
def __init__(self, object: object='') -> None: ...
def capitalize(self) -> str: ...
def center(self, width: int, fillchar: str = ...) -> str: ...
def count(self, x: unicode) -> int: ...
def count(self, x: unicode, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
def decode(self, encoding: unicode = ..., errors: unicode = ...) -> unicode: ...
def encode(self, encoding: unicode = ..., errors: unicode = ...) -> str: ...
def endswith(self, suffix: Union[unicode, Tuple[unicode, ...]]) -> bool: ...
def expandtabs(self, tabsize: int = 8) -> str: ...
def find(self, sub: unicode, start: int = 0, end: int = 0) -> int: ...
def find(self, sub: unicode, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
def format(self, *args: Any, **kwargs: Any) -> str: ...
def index(self, sub: unicode, start: int = 0, end: int = 0) -> int: ...
def index(self, sub: unicode, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
def isalnum(self) -> bool: ...
def isalpha(self) -> bool: ...
def isdigit(self) -> bool: ...
@@ -330,8 +330,8 @@ class str(basestring, Sequence[str]):
@overload
def partition(self, sep: unicode) -> Tuple[unicode, unicode, unicode]: ...
def replace(self, old: AnyStr, new: AnyStr, count: int = ...) -> AnyStr: ...
def rfind(self, sub: unicode, start: int = 0, end: int = 0) -> int: ...
def rindex(self, sub: unicode, start: int = 0, end: int = 0) -> int: ...
def rfind(self, sub: unicode, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
def rindex(self, sub: unicode, __start: Optional[int] = ..., __end: Optional[int] = ...) -> int: ...
def rjust(self, width: int, fillchar: str = ...) -> str: ...
@overload
def rpartition(self, sep: bytearray) -> Tuple[str, bytearray, str]: ...