Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove bogus decref
  • Loading branch information
rhettinger committed Oct 17, 2022
commit eb6949c8bd40b81451cacde4a2c773b1cebbf79d
2 changes: 1 addition & 1 deletion Lib/test/test_itertools.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def test_batched(self):
for i in range(len(data)):
s = data[:i]
batches = list(batched(s, n))
with self.subTest(s, n, batches):
with self.subTest(s=s, n=n, batches=batches):
# Order is preserved and no data is lost
self.assertEqual(''.join(batches), s)
# Each batch is an exact list
Expand Down
1 change: 0 additions & 1 deletion Modules/itertoolsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ batched_new_impl(PyTypeObject *type, PyObject *iterable, Py_ssize_t n)
}
it = PyObject_GetIter(iterable);
if (it == NULL) {
Py_DECREF(it);
return NULL;
}

Expand Down