2008-08-23 | Paul Boddie | file changeset files shortlog | Fixed temp allocation, hopefully. Changed usage of _generateTestBoolean to involve a pre-allocated temporary storage slot. This also helps to resolve issues with logical operations, since the current value was previously being implicitly used to communicate the result of such operations. Split the logical test program into two. |
paul@96 | 1 | #!/usr/bin/env python |
paul@96 | 2 | |
paul@96 | 3 | import imported |
paul@96 | 4 | |
paul@108 | 5 | imported.attr # cannot assign to this |
paul@96 | 6 | |
paul@96 | 7 | m = imported |
paul@108 | 8 | imported.a # cannot assign to this |
paul@108 | 9 | m.a # cannot assign to this (m is known) |
paul@96 | 10 | |
paul@96 | 11 | class C: # hack: make an attribute called y known to the system |
paul@96 | 12 | y = None # hack: this prevents compilation errors with the statements |
paul@96 | 13 | # hack: below |
paul@96 | 14 | |
paul@96 | 15 | n = None |
paul@96 | 16 | n = imported |
paul@108 | 17 | n.a = 1 # not detected due to reassignment of n |
paul@96 | 18 | n.y = 2 # not detected due to reassignment of n |
paul@96 | 19 | n.y = 3 # not detected due to reassignment of n |
paul@96 | 20 | |
paul@96 | 21 | # vim: tabstop=4 expandtab shiftwidth=4 |