From f1beef02e79504ed6f978dcd830f40293515947c Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 18 Jan 2016 16:44:44 -0800 Subject: [PATCH] Replace some unicode argument defaults with ... (the type checker does not care about the value). --- stdlib/2.7/__builtin__.pyi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/stdlib/2.7/__builtin__.pyi b/stdlib/2.7/__builtin__.pyi index 3f889be7e..9c59ed922 100644 --- a/stdlib/2.7/__builtin__.pyi +++ b/stdlib/2.7/__builtin__.pyi @@ -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: ...