2009-01-26 | Paul Boddie | file changeset files shortlog | Fixed the output representation of Block instances. Added support for some native methods, changing the invocation mechanism to use a special dictionary for mapping method names to method implementations. Moved run-time constant initialisation into the RSVPMachine class. Fixed the CheckException instruction, made _CheckInstance return a value, added a _MakeObject method. Added notes about the current solution for instance/class compatibility testing. |
paul@59 | 1 | #!/usr/bin/env python |
paul@59 | 2 | |
paul@59 | 3 | def f(a, b, *c): |
paul@59 | 4 | pass |
paul@59 | 5 | |
paul@59 | 6 | f(1, 2, 3) |
paul@59 | 7 | f(1, b=2) |
paul@59 | 8 | f(1, 2, 3, 4) |
paul@59 | 9 | |
paul@59 | 10 | g = f |
paul@59 | 11 | g(1, 2, 3) |
paul@59 | 12 | g(1, b=2) |
paul@59 | 13 | g(1, 2, 3, 4) |
paul@59 | 14 | |
paul@59 | 15 | def g(a, c, *b): |
paul@59 | 16 | pass |
paul@59 | 17 | |
paul@59 | 18 | g(1, c=2) |
paul@59 | 19 | g(1, 2, 3, 4) |
paul@59 | 20 | |
paul@59 | 21 | # vim: tabstop=4 expandtab shiftwidth=4 |