mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
Add itertools.batched (#9515)
This commit is contained in:
committed by
GitHub
parent
00d663e109
commit
62170653ce
@@ -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, ...]: ...
|
||||
|
||||
Reference in New Issue
Block a user