1.1 --- a/tests/mixins.py Mon Jun 15 00:40:25 2009 +0200
1.2 +++ b/tests/mixins.py Sun Jun 21 02:02:53 2009 +0200
1.3 @@ -2,14 +2,14 @@
1.4
1.5 class A:
1.6 def a(self):
1.7 - return self.x
1.8 + return self.x # x not defined in this class, provided in subclasses
1.9
1.10 class B(A):
1.11 - x = 123
1.12 + x = 123 # x provided here
1.13
1.14 class C(A):
1.15 def __init__(self, x):
1.16 - self.x = x
1.17 + self.x = x # x provided here
1.18
1.19 b = B()
1.20 c = C(456)
1.21 @@ -17,4 +17,7 @@
1.22 p = b.a()
1.23 q = c.a()
1.24
1.25 +result_123 = p
1.26 +result_456 = q
1.27 +
1.28 # vim: tabstop=4 expandtab shiftwidth=4