2009-06-07 | Paul Boddie | file changeset files shortlog | Fixed RSVP implementations of attribute access instructions, handling empty object table entries correctly and raising attribute errors under appropriate circumstances. Fixed the test for context overriding to handle the different context type values appropriately. |
paul@185 | 1 | #!/usr/bin/env python |
paul@185 | 2 | |
paul@185 | 3 | class C: |
paul@185 | 4 | def __call__(self): |
paul@229 | 5 | return 42 |
paul@185 | 6 | |
paul@185 | 7 | class D: |
paul@185 | 8 | def __init__(self, x): |
paul@185 | 9 | self.x = x |
paul@185 | 10 | |
paul@185 | 11 | c = C() |
paul@185 | 12 | d = D(c) |
paul@229 | 13 | result_42 = d.x() |
paul@185 | 14 | |
paul@185 | 15 | # vim: tabstop=4 expandtab shiftwidth=4 |