2011-03-19 | Paul Boddie | raw annotate files changeset graph | Added tentative support for tracking attribute assignments together with attribute usage. Added various tests of class attribute assignment which should eventually be supported. Added missing tests. |
1 #!/usr/bin/env python 2 3 class C: 4 clsattr = 123 5 clsattr2 = 456 6 7 class D: 8 clsattr = 321 9 10 def f(cls): 11 cls.clsattr = 789 12 if cls.clsattr: 13 cls.clsattr2 = 234 14 15 f(C) 16 f(D) 17 18 result_789 = C.clsattr 19 result_234 = C.clsattr2 20 result_789 = D.clsattr 21 22 # vim: tabstop=4 expandtab shiftwidth=4