2014-01-13 | Paul Boddie | file changeset files shortlog | Added failure tests involving closures. | syspython-as-target |
paul@507 | 1 | #!/usr/bin/env python |
paul@507 | 2 | |
paul@507 | 3 | class C: |
paul@507 | 4 | p = 1 |
paul@507 | 5 | q = 2 |
paul@507 | 6 | |
paul@507 | 7 | c = C() |
paul@507 | 8 | a = 1 |
paul@507 | 9 | |
paul@507 | 10 | for x in 0, 1, 2: |
paul@507 | 11 | if a: |
paul@507 | 12 | b = c.p |
paul@507 | 13 | else: |
paul@507 | 14 | b = c.q |
paul@507 | 15 | |
paul@507 | 16 | result_1 = b |
paul@507 | 17 | |
paul@507 | 18 | # vim: tabstop=4 expandtab shiftwidth=4 |