2012-02-26 | Paul Boddie | file changeset files shortlog | Generalised the active value mechanism to support different registers. |
paul@219 | 1 | #!/usr/bin/env python |
paul@219 | 2 | |
paul@339 | 3 | def f(self, x): |
paul@219 | 4 | return x |
paul@219 | 5 | |
paul@219 | 6 | class C: |
paul@339 | 7 | e = f |
paul@219 | 8 | |
paul@219 | 9 | class D: |
paul@219 | 10 | e = C.e |
paul@219 | 11 | |
paul@219 | 12 | d = D() |
paul@219 | 13 | q = d.e # unbound C.e |
paul@233 | 14 | result_321 = q(C(), 321) |
paul@219 | 15 | |
paul@219 | 16 | # vim: tabstop=4 expandtab shiftwidth=4 |