2008-03-31 | Paul Boddie | file changeset files shortlog | Introduced support for different levels of optimisations, tidying up the tests and actions for each optimisation. Added some support for default parameter values, with actual frame filling yet to be done. Added a test of default parameter values. Added more to the rationale. |
paul@62 | 1 | #!/usr/bin/env python |
paul@62 | 2 | |
paul@62 | 3 | def f(a, b, c=4): |
paul@62 | 4 | pass |
paul@62 | 5 | |
paul@62 | 6 | f(1, 2, 3) |
paul@62 | 7 | f(1, b=2, c=3) |
paul@62 | 8 | f(c=3, b=2, a=1) |
paul@62 | 9 | f(1, 2) |
paul@62 | 10 | |
paul@62 | 11 | g = f |
paul@62 | 12 | g(1, c=3, b=2) |
paul@62 | 13 | g(1, 2) |
paul@62 | 14 | |
paul@62 | 15 | def g(a, c, b=5): |
paul@62 | 16 | pass |
paul@62 | 17 | |
paul@62 | 18 | g(1, c=3, b=2) |
paul@62 | 19 | g(1, 3) |
paul@62 | 20 | |
paul@62 | 21 | # vim: tabstop=4 expandtab shiftwidth=4 |