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@219 | 1 | #!/usr/bin/env python |
paul@219 | 2 | |
paul@219 | 3 | class C: |
paul@219 | 4 | clsattr = 123 |
paul@219 | 5 | |
paul@219 | 6 | def update(self, value): |
paul@219 | 7 | self.attr = value |
paul@219 | 8 | C.clsattr = value |
paul@219 | 9 | |
paul@219 | 10 | c = C() |
paul@219 | 11 | c.update(456) |
paul@219 | 12 | |
paul@219 | 13 | # vim: tabstop=4 expandtab shiftwidth=4 |