2011-11-01 | Paul Boddie | file changeset files shortlog | Introduced attribute user finalisation to modules. |
paul@408 | 1 | #!/usr/bin/env python |
paul@408 | 2 | |
paul@408 | 3 | def f(a, b, *c): |
paul@408 | 4 | d = 123 # introduce locals in the frame |
paul@408 | 5 | return c |
paul@408 | 6 | |
paul@408 | 7 | g = f |
paul@408 | 8 | |
paul@408 | 9 | r4 = g(1, 2, 3) |
paul@408 | 10 | r5 = g(1, b=2) |
paul@408 | 11 | r6 = g(1, 2, 3, 4) |
paul@408 | 12 | |
paul@408 | 13 | def g(a, c, *b): |
paul@408 | 14 | d = 123 # introduce locals in the frame |
paul@408 | 15 | return b |
paul@408 | 16 | |
paul@408 | 17 | r7 = g(1, c=2) |
paul@408 | 18 | r8 = g(1, 2, 3, 4) |
paul@408 | 19 | |
paul@408 | 20 | result_0 = len(r5) |
paul@408 | 21 | result_1 = len(r4) |
paul@408 | 22 | result_2 = len(r6) |
paul@408 | 23 | result2_0 = len(r7) |
paul@408 | 24 | result2_2 = len(r8) |
paul@408 | 25 | |
paul@408 | 26 | # vim: tabstop=4 expandtab shiftwidth=4 |