2013-06-29 | Paul Boddie | raw annotate files changeset graph | 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 |
1 #!/usr/bin/env python 2 3 class C: 4 p = 123 5 6 class D: 7 p = 456 8 9 x = C 10 11 def change(): 12 global x 13 x = D 14 15 def use(y): 16 return y.p # usage of p 17 18 def f(): 19 return x.p # ambiguous 20 21 change() 22 result1_456 = x.p 23 result2_456 = f() 24 result3_456 = use(x) 25 26 # vim: tabstop=4 expandtab shiftwidth=4