[Python-checkins] r61173 - python/trunk/Modules/itertoolsmodule.c
raymond.hettinger
python-checkins at python.org
Sun Mar 2 13:02:19 CET 2008
Author: raymond.hettinger
Date: Sun Mar 2 13:02:19 2008
New Revision: 61173
Modified:
python/trunk/Modules/itertoolsmodule.c
Log:
Handle 0-tuples which can be singletons.
Modified: python/trunk/Modules/itertoolsmodule.c
==============================================================================
--- python/trunk/Modules/itertoolsmodule.c (original)
+++ python/trunk/Modules/itertoolsmodule.c Sun Mar 2 13:02:19 2008
@@ -1919,7 +1919,7 @@
Py_DECREF(old_result);
}
/* Now, we've got the only copy so we can update it in-place */
- assert (Py_REFCNT(result) == 1);
+ assert (npools==0 || Py_REFCNT(result) == 1);
/* Update the pool indices right-to-left. Only advance to the
next pool when the previous one rolls-over */
More information about the Python-checkins
mailing list