mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Beef-up docs and tests for itertools. Fix-up end-case for product().
This commit is contained in:
parent
378586a844
commit
d553d856e7
3 changed files with 145 additions and 19 deletions
|
@ -1885,10 +1885,7 @@ product_next(productobject *lz)
|
|||
|
||||
if (result == NULL) {
|
||||
/* On the first pass, return an initial tuple filled with the
|
||||
first element from each pool. If any pool is empty, then
|
||||
whole product is empty and we're already done */
|
||||
if (npools == 0)
|
||||
goto empty;
|
||||
first element from each pool. */
|
||||
result = PyTuple_New(npools);
|
||||
if (result == NULL)
|
||||
goto empty;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue