2010-09-07 | Paul Boddie | raw annotate files changeset graph | Changed attribute usage tracking to consider branching and separate usage possibilities in a slightly more rigourous way. Attempted to add isinstance support. Added tests of the revised attribute usage support. |
1 #!/usr/bin/env python 2 3 a = 1 4 b = 2 5 6 class X: 7 def __eq__(self, other): 8 return 0 9 def __ne__(self, other): 10 return 1 11 12 x = X() 13 14 result_1 = 0 15 result_2 = 2 16 result_3 = 3 17 18 if a != x != b: 19 result_1 = 1 20 21 if a == x != b: 22 result_2 = 0 23 24 if a == x: 25 result_3 = 0 26 27 # vim: tabstop=4 expandtab shiftwidth=4