1 class X: 2 def y(self): pass 3 class Y: 4 def x(self): pass 5 x = X() 6 y = Y() 7 try: 8 x.y() 9 finally: 10 y.x()