Commit 33fea7bf authored by Stefan Behnel's avatar Stefan Behnel

Merge branch '0.29.x'

parents 7537910a afc00fc3
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment