2008-08-18 | Paul Boddie | file changeset files shortlog | Added a class table which should provide run-time support for class compatibility testing. Improved optimisation activities to remove active value-providing instructions only where appropriate. Added more simple-input-employing instructions. Added notes about context discovery and replacement at run-time. Made the raw code dump include class contexts for class attributes where appropriate. Improved the tests of attribute access and invocation. |
paul@97 | 1 | #!/usr/bin/env python |
paul@97 | 2 | |
paul@97 | 3 | class E: |
paul@97 | 4 | pass |
paul@97 | 5 | |
paul@97 | 6 | def f(x, y): |
paul@97 | 7 | try: |
paul@97 | 8 | g(x) |
paul@97 | 9 | except E, exc: |
paul@97 | 10 | return y |
paul@97 | 11 | return x |
paul@97 | 12 | |
paul@97 | 13 | def g(x): |
paul@97 | 14 | raise E, x |
paul@97 | 15 | |
paul@97 | 16 | # vim: tabstop=4 expandtab shiftwidth=4 |