2009-01-26 | Paul Boddie | raw annotate files changeset graph | 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. |
1 #!/usr/bin/env python 2 3 class C: 4 def __init__(self, x): 5 pass 6 7 def f(self, a, b, c): 8 self.g(a) 9 m = self.g 10 m(b) 11 12 def g(self, x): 13 C.h(self, x) 14 15 def h(self, p): 16 pass 17 18 c = C(123) 19 c.f(1, 2, 3) 20 21 f = c.f 22 f(1, 2, 3) 23 24 # vim: tabstop=4 expandtab shiftwidth=4