2013-06-29 | Paul Boddie | file changeset files shortlog | Separated handling of getattr attribute usage from normal program unit usage, tracking only newly introduced program constants when evaluating the effects of getattr usage, and thus limiting the amount of work done identifying new program units to investigate on each occasion. | syspython-as-target |
paul@223 | 1 | #!/usr/bin/env python |
paul@223 | 2 | |
paul@223 | 3 | class C: |
paul@223 | 4 | clsattr = 123 |
paul@223 | 5 | clsattr2 = clsattr |
paul@223 | 6 | |
paul@223 | 7 | x = 0 # prevent optimisation of assignments |
paul@223 | 8 | x = C # prevent optimisation of assignments |
paul@228 | 9 | result_123 = x.clsattr |
paul@228 | 10 | result2_123 = x.clsattr2 |
paul@223 | 11 | |
paul@223 | 12 | # vim: tabstop=4 expandtab shiftwidth=4 |