Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
b61ff76e
Commit
b61ff76e
authored
Apr 25, 2009
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tuple unpacking bug (related to old temps)
parent
0493847c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
+28
-2
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+3
-2
tests/run/tupleunpack_Thmm.pyx
tests/run/tupleunpack_Thmm.pyx
+25
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
b61ff76e
...
...
@@ -3003,11 +3003,12 @@ class SequenceNode(NewTempExprNode):
def
allocate_target_temps
(
self
,
env
,
rhs
):
self
.
iterator
.
allocate_temps
(
env
)
for
arg
,
node
in
zip
(
self
.
args
,
self
.
coerced_unpacked_items
)
:
for
node
in
self
.
coerced_unpacked_items
:
node
.
allocate_temps
(
env
)
arg
.
allocate_target_temps
(
env
,
None
)
#arg.release_target_temp(env)
#node.release_temp(env)
for
arg
in
self
.
args
:
arg
.
allocate_target_temps
(
env
,
None
)
if
rhs
:
rhs
.
release_temp
(
env
)
self
.
iterator
.
release_temp
(
env
)
...
...
tests/run/tupleunpack_Thmm.pyx
0 → 100644
View file @
b61ff76e
"""
>>> func()
0 0
0
0
1 1
1
1
2 2
2
2
>>> func2()
"""
def
g
():
return
((
3
,
2
),
1
,
0
)
def
func2
():
(
a
,
b
),
c
,
d
=
g
()
def
func
():
for
(
a
,
b
),
c
,
d
in
zip
(
zip
(
range
(
3
),
range
(
3
)),
range
(
3
),
range
(
3
)):
print
a
,
b
print
c
print
d
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