2009-05-17 | Paul Boddie | file changeset files shortlog | Fixed unary operator code generation. Added subscript support. Added RSVP implementations of list.__getitem__ and int.__neg__. Added a test of subscripts and a currently unused test of star parameter unpacking. |
paul@189 | 1 | #!/usr/bin/env python |
paul@189 | 2 | |
paul@189 | 3 | def f(a, b, c=4): |
paul@190 | 4 | return c |
paul@189 | 5 | |
paul@189 | 6 | g = f |
paul@190 | 7 | r1 = g(1, c=3, b=2) |
paul@190 | 8 | r2 = g(1, 2) |
paul@189 | 9 | |
paul@189 | 10 | def g(a, c, b=5): |
paul@190 | 11 | return b |
paul@189 | 12 | |
paul@190 | 13 | r3 = g(1, c=3, b=2) |
paul@190 | 14 | r4 = g(1, 3) |
paul@189 | 15 | |
paul@189 | 16 | # vim: tabstop=4 expandtab shiftwidth=4 |