Replace some unicode argument defaults with ... (the type checker does not care about the value).

This commit is contained in:
Guido van Rossum
2016-01-18 16:44:44 -08:00
parent 2d82816e14
commit f1beef02e7

View File

@@ -191,12 +191,12 @@ class unicode(basestring, Sequence[unicode]):
@overload
def __init__(self, o: object) -> None: ...
@overload
def __init__(self, o: str, encoding: unicode = ..., errors: unicode = 'strict') -> None: ...
def __init__(self, o: str, encoding: unicode = ..., errors: unicode = ...) -> None: ...
def capitalize(self) -> unicode: ...
def center(self, width: int, fillchar: unicode = u' ') -> unicode: ...
def count(self, x: unicode) -> int: ...
def decode(self, encoding: unicode = 'utf-8', errors: unicode = 'strict') -> unicode: ...
def encode(self, encoding: unicode = 'utf-8', errors: unicode = 'strict') -> str: ...
def decode(self, encoding: unicode = ..., errors: unicode = ...) -> unicode: ...
def encode(self, encoding: unicode = ..., errors: unicode = ...) -> str: ...
def endswith(self, suffix: Union[unicode, Tuple[unicode, ...]], start: int = 0,
end: int = ...) -> bool: ...
def expandtabs(self, tabsize: int = 8) -> unicode: ...
@@ -267,8 +267,8 @@ class str(basestring, Sequence[str]):
def capitalize(self) -> str: ...
def center(self, width: int, fillchar: str = ...) -> str: ...
def count(self, x: unicode) -> int: ...
def decode(self, encoding: unicode = 'utf-8', errors: unicode = 'strict') -> unicode: ...
def encode(self, encoding: unicode = 'utf-8', errors: unicode = 'strict') -> str: ...
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: ...
@@ -359,13 +359,13 @@ class bytearray(Sequence[int]):
def __init__(self, x: Union[Iterable[int], str]) -> None: ...
@overload
def __init__(self, x: unicode, encoding: unicode,
errors: unicode = 'strict') -> None: ...
errors: unicode = ...) -> None: ...
@overload
def __init__(self, length: int) -> None: ...
def capitalize(self) -> bytearray: ...
def center(self, width: int, fillchar: str = ...) -> bytearray: ...
def count(self, x: str) -> int: ...
def decode(self, encoding: unicode = 'utf-8', errors: unicode = 'strict') -> str: ...
def decode(self, encoding: unicode = ..., errors: unicode = ...) -> str: ...
def endswith(self, suffix: Union[str, Tuple[str, ...]]) -> bool: ...
def expandtabs(self, tabsize: int = 8) -> bytearray: ...
def find(self, sub: str, start: int = 0, end: int = ...) -> int: ...