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
Kirill Smelkov
cython
Commits
ee8c3ac4
Commit
ee8c3ac4
authored
Jun 29, 2020
by
da-woods
Committed by
Stefan Behnel
Jun 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix argument name usage in finally blocks (GH-3713)
Fixes #3712 (hopefully) by reverting a small part of
bbef4d74
parent
e87fb0ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
Cython/Compiler/FlowControl.py
Cython/Compiler/FlowControl.py
+1
-0
tests/compile/tryfinally.pyx
tests/compile/tryfinally.pyx
+7
-0
No files found.
Cython/Compiler/FlowControl.py
View file @
ee8c3ac4
...
@@ -1198,6 +1198,7 @@ class ControlFlowAnalysis(CythonTransform):
...
@@ -1198,6 +1198,7 @@ class ControlFlowAnalysis(CythonTransform):
if
self
.
flow
.
loops
:
if
self
.
flow
.
loops
:
self
.
flow
.
loops
[
-
1
].
exceptions
.
append
(
descr
)
self
.
flow
.
loops
[
-
1
].
exceptions
.
append
(
descr
)
self
.
flow
.
block
=
body_block
self
.
flow
.
block
=
body_block
body_block
.
add_child
(
entry_point
)
self
.
flow
.
nextblock
()
self
.
flow
.
nextblock
()
self
.
_visit
(
node
.
body
)
self
.
_visit
(
node
.
body
)
self
.
flow
.
exceptions
.
pop
()
self
.
flow
.
exceptions
.
pop
()
...
...
tests/compile/tryfinally.pyx
View file @
ee8c3ac4
...
@@ -18,4 +18,11 @@ def f(a, b, c, x):
...
@@ -18,4 +18,11 @@ def f(a, b, c, x):
finally
:
finally
:
i
=
42
i
=
42
def
use_name_in_finally
(
name
):
# GH3712
try
:
[]
finally
:
name
()
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