2007-06-24 | paulb | raw annotate files changeset graph | Added string item and slice access. Tidied up list initialisation. Added the sys module. |
1 #!/usr/bin/env python 2 3 class A: 4 def m(self): 5 return 6 7 def test(): 8 a1 = A() 9 a2 = A() 10 m1 = a1.m 11 m2 = a2.m 12 if 1: 13 m = m1 14 else: 15 m = m2 16 m() 17 18 a1 = A() 19 a2 = A() 20 m1 = a1.m 21 m2 = a2.m 22 if 1: 23 m = m1 24 else: 25 m = m2 26 m() 27 28 test() 29 30 # vim: tabstop=4 expandtab shiftwidth=4