summaryrefslogtreecommitdiffstats
path: root/Modules/itertoolsmodule.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-03-04 04:17:08 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-03-04 04:17:08 (GMT)
commitd553d856e7471b4e6c9ede6a445b813a7e468d4f (patch)
tree9f47f542aae79d4eda81e4bc7443c996140e75c9 /Modules/itertoolsmodule.c
parent378586a844cd1cc8346482b515a24740eedbb59e (diff)
downloadcpython-d553d856e7471b4e6c9ede6a445b813a7e468d4f.zip
cpython-d553d856e7471b4e6c9ede6a445b813a7e468d4f.tar.gz
cpython-d553d856e7471b4e6c9ede6a445b813a7e468d4f.tar.bz2
Beef-up docs and tests for itertools. Fix-up end-case for product().
Diffstat (limited to 'Modules/itertoolsmodule.c')
-rw-r--r--Modules/itertoolsmodule.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 62b2c19..76c8484 100644
--- a/Modules/itertoolsmodule.c
+++ b/Modules/itertoolsmodule.c
@@ -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;