Files
openide/python/testData/debug/test3.py
Andrey Lisin 5029797a6c IDEA-CR-57291: PY-37771 Port new IDEA debugger smart step into UI/UX to PyCharm
(cherry picked from commit 4fefae6a1d9fbc6df174d53222ceba9208691b65)

GitOrigin-RevId: d6e65ace1378765be246fe09a86d2bff133855df
2020-02-21 17:31:28 +00:00

26 lines
367 B
Python

class A:
def __init__(self, z):
self.z = z
def foo(self, x):
y = 2 * x + self.z
return 1 + y
def zoo(x):
y = int((x - 2) / (x - 1))
return A(y)
print(zoo(2).foo(2))
try:
try:
print(zoo(1).foo(2)) #we got ZeroDivision here
finally:
print(zoo(0).foo(4))
except:
pass
a = zoo(-1)
print(a.foo(2))