2007-09-06 | Paul Boddie | raw annotate files changeset graph | Added a fully-qualified name method for WithName-derived classes, producing a more usable global name for applications such as the viewer. Added a method for returning "visible" class attributes to GeneralClass. Added an attribute table production function for integration with the explicit distribution, along with a test program option for generating such a table. |
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