itertools.islice allows step=None (#2142)

This commit is contained in:
Zac Hatfield-Dodds
2018-05-17 23:35:02 +10:00
committed by Jelle Zijlstra
parent f4d19d9f61
commit d5929ada4d
2 changed files with 2 additions and 2 deletions

View File

@@ -41,7 +41,7 @@ def groupby(iterable: Iterable[_T],
def islice(iterable: Iterable[_T], stop: Optional[int]) -> Iterator[_T]: ...
@overload
def islice(iterable: Iterable[_T], start: Optional[int], stop: Optional[int],
step: int = ...) -> Iterator[_T]: ...
step: Optional[int] = ...) -> Iterator[_T]: ...
_T1 = TypeVar('_T1')
_T2 = TypeVar('_T2')

View File

@@ -43,7 +43,7 @@ def groupby(iterable: Iterable[_T],
def islice(iterable: Iterable[_T], stop: Optional[int]) -> Iterator[_T]: ...
@overload
def islice(iterable: Iterable[_T], start: Optional[int], stop: Optional[int],
step: int = ...) -> Iterator[_T]: ...
step: Optional[int] = ...) -> Iterator[_T]: ...
def starmap(func: Callable[..., _S], iterable: Iterable[Iterable[Any]]) -> Iterator[_S]: ...
def takewhile(predicate: Callable[[_T], Any],