Skip to content

Commit

Permalink
gh-102876: remove superfluous parens from itertools.batched recipe (G…
Browse files Browse the repository at this point in the history
…H-102877)

remove superfluous parens from itertools.batched recipe
  • Loading branch information
wimglenn authored Mar 21, 2023
1 parent 3bb4756 commit 4bb1dd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Doc/library/itertools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ loops that truncate the stream.
if n < 1:
raise ValueError('n must be at least one')
it = iter(iterable)
while (batch := tuple(islice(it, n))):
while batch := tuple(islice(it, n)):
yield batch

.. versionadded:: 3.12
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_itertools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1846,7 +1846,7 @@ def batched_recipe(iterable, n):
if n < 1:
raise ValueError('n must be at least one')
it = iter(iterable)
while (batch := tuple(islice(it, n))):
while batch := tuple(islice(it, n)):
yield batch

for iterable, n in product(
Expand Down

0 comments on commit 4bb1dd3

Please sign in to comment.