Commit 70f71677 authored by Kevin Modzelewski's avatar Kevin Modzelewski

itertools.product() fix

parent 9df41bb5
......@@ -1956,7 +1956,8 @@ product_next(productobject *lz)
Py_DECREF(old_result);
}
/* Now, we've got the only copy so we can update it in-place */
assert (npools==0 || 2 /*Pyston change, was: Py_REFCNT(result)*/ == 1);
// Pyston change: safe to comment this out since we will always create a new tuple:
// 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 */
......
......@@ -14,3 +14,5 @@ for i in xrange(10):
print
print list(itertools.dropwhile(lambda x: x == 0, reversed((1, 2, 3))))
print list(itertools.product(range(4), range(4)))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment