2009-06-01 | Paul Boddie | raw annotate files changeset graph | Fixed StoreCallable using a new DataObject method which replaces the address of the callable. Made a cmd module to handle common compilation and processing activities. Renamed MakeObject to MakeInstance. Changed FillDefaults to use the current value as a reference to the container holding the defaults. Removed the extra temporary storage slot previously used when adjusting frames. Changed lambda functions to use a context parameter, changing the image to not reserve space for defaults immediately after the header of such functions. Added notes about the issues with positioning keyword arguments. Expanded and improved the tests. |
1 #!/usr/bin/env python 2 3 class B: 4 def __init__(self, y): 5 self.y = y 6 7 class A: 8 c1 = B 9 def __init__(self, b): 10 self.c2 = B 11 self.c3 = b 12 13 b = B(789) 14 a = A(b) 15 16 b1 = A.c1(678) # A.c1 is just a reference to B 17 result_678 = b1.y 18 b2 = a.c1(567) # a.c1 is just a reference to B 19 result_567 = b2.y 20 b3 = a.c2(765) # a.c2 is just a reference to B 21 result_765 = b3.y 22 23 # vim: tabstop=4 expandtab shiftwidth=4