2010-08-07 | Paul Boddie | file changeset files shortlog | Added some support for HTML reports of program modules, separating the program finalisation out into a separate method of the Program class, in order to avoid obtaining an actual program image, yet removing unneeded parts of a program. Moved code to test for the usage of program sections into the common module, since this is also useful when generating reports. Added AST node annotation documentation. |
paul@342 | 1 | #!/usr/bin/env python |
paul@342 | 2 | |
paul@342 | 3 | a = 1 |
paul@342 | 4 | |
paul@342 | 5 | def before(): |
paul@342 | 6 | b = a |
paul@342 | 7 | a = 2 |
paul@342 | 8 | return b |
paul@342 | 9 | |
paul@342 | 10 | def reassign(): |
paul@342 | 11 | a = a |
paul@342 | 12 | return a |
paul@342 | 13 | |
paul@342 | 14 | result1_1 = before() |
paul@342 | 15 | result2_1 = reassign() |
paul@342 | 16 | |
paul@342 | 17 | # vim: tabstop=4 expandtab shiftwidth=4 |