Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
70f71677
Commit
70f71677
authored
Sep 09, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
itertools.product() fix
parent
9df41bb5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
from_cpython/Modules/itertoolsmodule.c
from_cpython/Modules/itertoolsmodule.c
+2
-1
test/tests/itertools_test.py
test/tests/itertools_test.py
+2
-0
No files found.
from_cpython/Modules/itertoolsmodule.c
View file @
70f71677
...
...
@@ -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 */
...
...
test/tests/itertools_test.py
View file @
70f71677
...
...
@@ -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
)))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment