Files
python-uncompyle6/test/simple_source/bug25/03_try_else.py
2018-02-21 04:17:08 -05:00

18 lines
336 B
Python

# Bug found in 2.4 test_math.py
# Bug was turning last try/except/else into try/else
import math
def test_exceptions():
try:
x = math.exp(-1000000000)
except:
raise RuntimeError
try:
x = math.sqrt(-1.0)
except ValueError:
return x
else:
raise RuntimeError
test_exceptions()