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
bc82e78e
Commit
bc82e78e
authored
Nov 26, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extended test case
parent
2a6bfe21
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
tests/run/tryfinally.pyx
tests/run/tryfinally.pyx
+23
-0
No files found.
tests/run/tryfinally.pyx
View file @
bc82e78e
...
...
@@ -9,6 +9,9 @@ TypeError
Traceback (most recent call last):
TypeError
>>> call_try_return_with_exception()
1
>>> def try_return_py():
... try:
... return 1
...
...
@@ -18,6 +21,8 @@ TypeError
2
>>> try_return_cy()
2
>>> call_try_return_c()
2
>>> i=1
>>> for i in range(3):
...
...
@@ -46,6 +51,24 @@ def try_return_cy():
finally
:
return
2
cdef
int
try_return_c
():
try
:
return
1
finally
:
return
2
def
call_try_return_c
():
return
try_return_c
()
cdef
int
try_return_with_exception
():
try
:
raise
TypeError
finally
:
return
1
def
call_try_return_with_exception
():
return
try_return_with_exception
()
def
try_return_temp
(
a
):
b
=
a
+
2
try
:
...
...
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