Skip to content

Commit b5ec69f

Browse files
Add missing strict argument for itertools.batched (3.13) (#12256)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
1 parent 73d5a55 commit b5ec69f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

stdlib/itertools.pyi

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@ if sys.version_info >= (3, 10):
326326

327327
if sys.version_info >= (3, 12):
328328
class batched(Iterator[tuple[_T_co, ...]], Generic[_T_co]):
329-
def __new__(cls, iterable: Iterable[_T_co], n: int) -> Self: ...
329+
if sys.version_info >= (3, 13):
330+
def __new__(cls, iterable: Iterable[_T_co], n: int, *, strict: bool = False) -> Self: ...
331+
else:
332+
def __new__(cls, iterable: Iterable[_T_co], n: int) -> Self: ...
333+
330334
def __iter__(self) -> Self: ...
331335
def __next__(self) -> tuple[_T_co, ...]: ...

0 commit comments

Comments
 (0)