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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
15bedf56
Commit
15bedf56
authored
Dec 09, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
merged 0.17 branch into master
parents
19c2e5a9
dfb2d745
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-0
tests/run/generators_py.py
tests/run/generators_py.py
+12
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
15bedf56
...
...
@@ -1867,6 +1867,8 @@ class NameNode(AtomicExprNode):
code
.
put_error_if_unbound
(
self
.
pos
,
self
.
entry
)
if
self
.
entry
.
type
.
is_pyobject
:
if
self
.
entry
.
in_closure
:
code
.
put_gotref
(
self
.
result
())
# generator
code
.
put_decref
(
self
.
result
(),
self
.
ctype
())
code
.
putln
(
'%s = NULL;'
%
self
.
result
())
else
:
...
...
tests/run/generators_py.py
View file @
15bedf56
...
...
@@ -350,3 +350,15 @@ def test_generator_cleanup():
yield
1
finally
:
print
(
'cleanup'
)
def
test_del_in_generator
():
"""
>>> [ s for s in test_del_in_generator() ]
['abcabcabc', 'abcabcabc']
"""
x
=
len
(
'abc'
)
*
'abc'
a
=
x
yield
x
del
x
yield
a
del
a
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