1 #!/usr/bin/env python 2 3 class C: 4 def f(self): 5 return 1 6 7 class D: 8 def f(self): 9 return 2 10 11 def g(self): 12 return 3 13 14 class E: 15 def f(self): 16 return 4 17 18 def h(self): 19 return 5 20 21 def test_new_conditional(obj, obj2): 22 # obj: 23 # obj2: 24 if obj.f(): # C, D, E (f) 25 obj = obj2 # obj: D (g) 26 obj.g() # D (g) 27 else: 28 obj.h() # E (f, h) 29 # # (g) ^ (f, h) 30 return 5 31 32 c = C() 33 d = D() 34 e = E() 35 result1_5 = test_new_conditional(e, d) 36 37 # vim: tabstop=4 expandtab shiftwidth=4