2013-11-17 | Paul Boddie | raw annotate files changeset graph | Dispatch to augmented assignment targets as expressions. | syspython-as-target |
1 #!/usr/bin/env python 2 3 class C: 4 def f(self): 5 return 1 6 def g(self): 7 return 2 8 9 class D: 10 def g(self): 11 return 3 12 13 def test_conditional(x, obj): 14 obj.f() 15 if x: 16 if x: 17 a = obj.g() 18 return a 19 return 1 20 21 c = C() 22 d = D() 23 result1_2 = test_conditional(1, c) 24 25 # vim: tabstop=4 expandtab shiftwidth=4