diff Modules/itertoolsmodule.c @ 45651:e44c745bec0b legacy-trunk

Beef-up docs and tests for itertools. Fix-up end-case for product().
author Raymond Hettinger <python@rcn.com>
date Tue, 04 Mar 2008 04:17:08 +0000
parents 96ca8c7cedc4
children 8a5c75efae4c
line wrap: on
line diff
--- a/Modules/itertoolsmodule.c	Tue Mar 04 01:50:32 2008 +0000
+++ b/Modules/itertoolsmodule.c	Tue Mar 04 04:17:08 2008 +0000
@@ -1885,10 +1885,7 @@
 
 	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;