diff --git a/stdlib/itertools.pyi b/stdlib/itertools.pyi index 4ae9bac0e..3a77edafe 100644 --- a/stdlib/itertools.pyi +++ b/stdlib/itertools.pyi @@ -196,3 +196,9 @@ class combinations_with_replacement(Iterator[Tuple[_T, ...]], Generic[_T]): def __init__(self, iterable: Iterable[_T], r: int) -> None: ... def __iter__(self) -> Iterator[Tuple[_T, ...]]: ... def __next__(self) -> Tuple[_T, ...]: ... + +if sys.version_info >= (3, 10): + class pairwise(Iterator[_T_co], Generic[_T_co]): + def __new__(cls, __iterable: Iterable[_T]) -> pairwise[Tuple[_T, _T]]: ... + def __iter__(self) -> Iterator[_T_co]: ... + def __next__(self) -> _T_co: ...