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@187 | 1 | #!/usr/bin/env python |
paul@187 | 2 | |
paul@187 | 3 | def f(a, b, c=a+b): |
paul@187 | 4 | return a + b + c |
paul@187 | 5 | |
paul@188 | 6 | a = 10 # used in f default |
paul@188 | 7 | b = 20 # used in f default |
paul@187 | 8 | x = f(1, 2) |
paul@187 | 9 | |
paul@187 | 10 | # vim: tabstop=4 expandtab shiftwidth=4 |