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
664a102e
Commit
664a102e
authored
Aug 17, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0.23.x'
parents
0a8f5192
3f684dfe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
Cython/Compiler/FlowControl.py
Cython/Compiler/FlowControl.py
+1
-0
tests/run/tryfinally.pyx
tests/run/tryfinally.pyx
+12
-0
No files found.
Cython/Compiler/FlowControl.py
View file @
664a102e
...
@@ -418,6 +418,7 @@ class NameReference(object):
...
@@ -418,6 +418,7 @@ class NameReference(object):
ref
.
node
=
deepcopy
(
self
.
node
,
memo
)
ref
.
node
=
deepcopy
(
self
.
node
,
memo
)
ref
.
entry
=
self
.
entry
ref
.
entry
=
self
.
entry
ref
.
pos
=
self
.
node
.
pos
ref
.
pos
=
self
.
node
.
pos
return
ref
class
ControlFlowState
(
list
):
class
ControlFlowState
(
list
):
...
...
tests/run/tryfinally.pyx
View file @
664a102e
...
@@ -532,8 +532,20 @@ def complex_finally_clause(x, obj):
...
@@ -532,8 +532,20 @@ def complex_finally_clause(x, obj):
from
contextlib
import
contextmanager
from
contextlib
import
contextmanager
with
contextmanager
(
lambda
:
(
yield
1
))()
as
y
:
with
contextmanager
(
lambda
:
(
yield
1
))()
as
y
:
assert
y
==
1
assert
y
==
1
a
=
1
with
nogil
:
if
i
>
0
:
with
gil
:
assert
obj
.
method
a
=
2
# FIXME: prevent deep-copying inner functions
#def closure(l):
# assert l == lobj
#closure()
assert
name
[
0
]
in
string
.
ascii_letters
assert
name
[
0
]
in
string
.
ascii_letters
string
.
Template
(
"-- huhu $name --"
).
substitute
(
**
{
'name'
:
'(%s)'
%
name
})
string
.
Template
(
"-- huhu $name --"
).
substitute
(
**
{
'name'
:
'(%s)'
%
name
})
if
a
:
a
=
3
del
l
[
0
],
lobj
[
0
]
del
l
[
0
],
lobj
[
0
]
assert
all
(
i
==
3
for
i
in
l
),
l
assert
all
(
i
==
3
for
i
in
l
),
l
return
99
return
99
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