2008-02-22 | Paul Boddie | raw annotate files changeset graph | Attempt to provide instance attribute position re-use. Added a test of subclasses. |
1 #!/usr/bin/env python 2 3 class A: 4 def __init__(self, x): 5 self.x = x 6 7 def a(self): 8 pass 9 10 class B(A): 11 def b(self): 12 pass 13 14 class C(A, B): 15 def __init__(self, x, y): 16 self.x = x 17 self.y = y 18 19 def a(self): 20 pass 21 22 class D: 23 def __init__(self, y): 24 self.y = y 25 26 class E(C, D): 27 pass 28 29 class F(A, D): 30 pass 31 32 # vim: tabstop=4 expandtab shiftwidth=4