Consistently use '= ...' for optional parameters.

This commit is contained in:
Matthias Kramm
2015-11-09 13:55:00 -08:00
parent 375bf063b1
commit 94c9ce8fd0
278 changed files with 2085 additions and 2085 deletions

View File

@@ -8,8 +8,8 @@ from typing import (Iterator, TypeVar, Iterable, overload, Any, Callable, Tuple,
_T = TypeVar('_T')
_S = TypeVar('_S')
def count(start: int = 0,
step: int = 1) -> Iterator[int]: ... # more general types?
def count(start: int = ...,
step: int = ...) -> Iterator[int]: ... # more general types?
def cycle(iterable: Iterable[_T]) -> Iterator[_T]: ...
@overload
@@ -36,21 +36,21 @@ def groupby(iterable: Iterable[_T],
def islice(iterable: Iterable[_T], stop: int) -> Iterator[_T]: ...
@overload
def islice(iterable: Iterable[_T], start: int, stop: int,
step: int = 1) -> Iterator[_T]: ...
step: int = ...) -> Iterator[_T]: ...
def starmap(func: Any, iterable: Iterable[Any]) -> Iterator[Any]: ...
def takewhile(predicate: Callable[[_T], Any],
iterable: Iterable[_T]) -> Iterator[_T]: ...
def tee(iterable: Iterable[Any], n: int = 2) -> Iterator[Any]: ...
def tee(iterable: Iterable[Any], n: int = ...) -> Iterator[Any]: ...
def zip_longest(*p: Iterable[Any],
fillvalue: Any = None) -> Iterator[Any]: ...
fillvalue: Any = ...) -> Iterator[Any]: ...
# TODO: Return type should be Iterator[Tuple[..]], but unknown tuple shape.
# Iterator[Sequence[_T]] loses this type information.
def product(*p: Iterable[_T], repeat: int = 1) -> Iterator[Sequence[_T]]: ...
def product(*p: Iterable[_T], repeat: int = ...) -> Iterator[Sequence[_T]]: ...
def permutations(iterable: Iterable[_T],
r: Union[int, None] = None) -> Iterator[Sequence[_T]]: ...
r: Union[int, None] = ...) -> Iterator[Sequence[_T]]: ...
def combinations(iterable: Iterable[_T],
r: int) -> Iterable[Sequence[_T]]: ...
def combinations_with_replacement(iterable: Iterable[_T],