itertools.count() can take floats as well as ints (#1650)

This commit is contained in:
hashstat
2017-10-07 08:30:07 -07:00
committed by Jelle Zijlstra
parent c03e3a7ac0
commit 97b16a0b34

View File

@@ -7,9 +7,10 @@ from typing import (Iterator, TypeVar, Iterable, overload, Any, Callable, Tuple,
_T = TypeVar('_T')
_S = TypeVar('_S')
_N = TypeVar('_N', int, float)
def count(start: int = ...,
step: int = ...) -> Iterator[int]: ... # more general types?
def count(start: _N = ...,
step: _N = ...) -> Iterator[_N]: ... # more general types?
def cycle(iterable: Iterable[_T]) -> Iterator[_T]: ...
@overload