mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
itertools.count() can take floats as well as ints (#1650)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user