diff options
author | Raymond Hettinger <python@rcn.com> | 2008-03-02 12:02:19 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-03-02 12:02:19 (GMT) |
commit | e3fabd10cb898a93cf32d743d44ca85290b78f07 (patch) | |
tree | 562512c4b15aaca4a8a65dcb393a2153a71e50da /Modules | |
parent | 61024b918178ac00873a703880b7cd84c7d80592 (diff) | |
download | cpython-e3fabd10cb898a93cf32d743d44ca85290b78f07.zip cpython-e3fabd10cb898a93cf32d743d44ca85290b78f07.tar.gz cpython-e3fabd10cb898a93cf32d743d44ca85290b78f07.tar.bz2 |
Handle 0-tuples which can be singletons.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/itertoolsmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index bd5543c..62b2c19 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -1919,7 +1919,7 @@ product_next(productobject *lz) 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 */ |