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
c7aed328
Commit
c7aed328
authored
Mar 12, 2022
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test.
parent
6a573cd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
tests/run/tryexcept.pyx
tests/run/tryexcept.pyx
+17
-0
No files found.
tests/run/tryexcept.pyx
View file @
c7aed328
...
...
@@ -501,3 +501,20 @@ def complete_except_as_raise(x, a, b):
else
:
i
=
5
return
i
def
try_except_raise_new
(
initial
,
catch
,
throw
):
"""
>>> try_except_raise_new(None, TypeError, ValueError)
>>> try_except_raise_new(TypeError, IndexError, ValueError)
Traceback (most recent call last):
TypeError
>>> try_except_raise_new(TypeError, TypeError, ValueError)
Traceback (most recent call last):
ValueError
"""
try
:
if
initial
is
not
None
:
raise
initial
except
catch
:
raise
throw
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