From 97b16a0b34a137ced83518be6c9ac592bc6007e6 Mon Sep 17 00:00:00 2001 From: hashstat Date: Sat, 7 Oct 2017 08:30:07 -0700 Subject: [PATCH] itertools.count() can take floats as well as ints (#1650) --- stdlib/3/itertools.pyi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stdlib/3/itertools.pyi b/stdlib/3/itertools.pyi index 1f79cd257..6421163ff 100644 --- a/stdlib/3/itertools.pyi +++ b/stdlib/3/itertools.pyi @@ -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