You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
18 lines
336 B
Python
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()
|