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
e4f6e4ca
Commit
e4f6e4ca
authored
Feb 10, 2009
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extend tryfinally testcase
parent
e908c0b9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
tests/run/tryfinally.pyx
tests/run/tryfinally.pyx
+24
-0
No files found.
tests/run/tryfinally.pyx
View file @
e4f6e4ca
...
@@ -29,6 +29,8 @@ TypeError
...
@@ -29,6 +29,8 @@ TypeError
3
3
>>> try_continue(3)
>>> try_continue(3)
3
3
>>> try_return_none_1()
>>> try_return_none_2()
"""
"""
def
finally_except
():
def
finally_except
():
...
@@ -59,3 +61,25 @@ def try_continue(a):
...
@@ -59,3 +61,25 @@ def try_continue(a):
finally
:
finally
:
i
+=
1
i
+=
1
return
i
return
i
def
try_return_none_1
():
try
:
return
finally
:
return
cdef
extern
from
*
:
ctypedef
struct
PyObject
void
Py_INCREF
(
object
)
cdef
PyObject
*
_none
():
ret
=
None
Py_INCREF
(
ret
)
return
<
PyObject
*>
ret
def
try_return_none_2
():
try
:
return
<
object
>
_none
()
finally
:
return
<
object
>
_none
()
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