Skip to content

Commit

Permalink
Add missing strict argument for itertools.batched (3.13) (python#…
Browse files Browse the repository at this point in the history
…12256)

Co-authored-by: Shantanu <[email protected]>
  • Loading branch information
max-muoto and hauntsaninja authored Jul 2, 2024
1 parent 73d5a55 commit b5ec69f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion stdlib/itertools.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,10 @@ if sys.version_info >= (3, 10):

if sys.version_info >= (3, 12):
class batched(Iterator[tuple[_T_co, ...]], Generic[_T_co]):
def __new__(cls, iterable: Iterable[_T_co], n: int) -> Self: ...
if sys.version_info >= (3, 13):
def __new__(cls, iterable: Iterable[_T_co], n: int, *, strict: bool = False) -> Self: ...
else:
def __new__(cls, iterable: Iterable[_T_co], n: int) -> Self: ...

def __iter__(self) -> Self: ...
def __next__(self) -> tuple[_T_co, ...]: ...

0 comments on commit b5ec69f

Please sign in to comment.