2008-02-17 | Paul Boddie | file changeset files shortlog | Moved deliberately failing tests to a special directory. Added support for generating attribute access instructions. Added further tests of class and instance attributes. Added optimisation of collective predictable attribute accesses. |
paul@27 | 1 | #!/usr/bin/env python |
paul@27 | 2 | |
paul@27 | 3 | a = 1 |
paul@27 | 4 | a |
paul@27 | 5 | b = 2 |
paul@27 | 6 | |
paul@27 | 7 | def f(x): |
paul@27 | 8 | b = 3 |
paul@27 | 9 | |
paul@27 | 10 | def g(x): |
paul@27 | 11 | global b |
paul@27 | 12 | b = 4 |
paul@27 | 13 | |
paul@34 | 14 | class C: |
paul@34 | 15 | value = "hello" |
paul@34 | 16 | for x in range(a, b): |
paul@34 | 17 | subvalue = "world" |
paul@34 | 18 | |
paul@43 | 19 | C.value |
paul@43 | 20 | |
paul@27 | 21 | # vim: tabstop=4 expandtab shiftwidth=4 |