1 #!/usr/bin/env python 2 3 """ 4 This test illustrates the need for propagation of usage to assignments providing 5 active name definitions. 6 """ 7 8 class C: 9 def f(self): 10 return 1 11 12 class D: 13 def f(self): 14 return 2 15 16 def g(self): 17 return 3 18 19 class E: 20 def f(self): 21 return 4 22 23 def h(self): # unused 24 return 5 25 26 def test_new(obj, obj2): 27 # obj: f 28 if obj.f(): 29 obj = obj2 # obj: f, g 30 obj.g() 31 return obj.f() 32 33 c = C() 34 d = D() 35 e = E() 36 result2_2 = test_new(c, d) 37 38 # vim: tabstop=4 expandtab shiftwidth=4