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@234 | 1 | #!/usr/bin/env python |
paul@234 | 2 | |
paul@234 | 3 | add_2 = lambda a, b=2: a + b |
paul@234 | 4 | |
paul@234 | 5 | def g(f, x): |
paul@234 | 6 | return f(x) |
paul@234 | 7 | |
paul@234 | 8 | result_3 = add_2(1) |
paul@234 | 9 | result2_3 = g(add_2, 1) |
paul@234 | 10 | |
paul@234 | 11 | # vim: tabstop=4 expandtab shiftwidth=4 |