2010-06-05 | Paul Boddie | raw annotate files changeset graph | Added null argument notation in order to actually support other arguments when processing the package itself. |
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_conditional(obj): 22 # obj: C, D, E (f) 23 if obj.f(): # C, D, E (f) 24 obj.g() # D (f, g) 25 else: 26 obj.h() # E (f, h) 27 # # (f, g) ^ (f, h) 28 return 2 29 30 c = C() 31 d = D() 32 e = E() 33 result1_2 = test_conditional(d) 34 35 # vim: tabstop=4 expandtab shiftwidth=4