Add itertools.batched (#9515)

This commit is contained in:
James Hilton-Balfe
2023-01-12 22:07:26 +00:00
committed by GitHub
parent 00d663e109
commit 62170653ce

View File

@@ -271,3 +271,9 @@ if sys.version_info >= (3, 10):
def __new__(cls, __iterable: Iterable[_T]) -> pairwise[tuple[_T, _T]]: ...
def __iter__(self: Self) -> Self: ...
def __next__(self) -> _T_co: ...
if sys.version_info >= (3, 12):
class batched(Iterator[_T_co], Generic[_T_co]):
def __new__(cls: type[Self], iterable: Iterable[_T_co], n: int) -> Self: ...
def __iter__(self: Self) -> Self: ...
def __next__(self) -> tuple[_T_co, ...]: ...