micropython

Annotated tests/failure/attributes_class_bind_function_unbound_fake_self.py

233:8abc113da24c
2009-06-01 Paul Boddie 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.
paul@233 1
#!/usr/bin/env python
paul@233 2
paul@233 3
def e(self, x):
paul@233 4
    return x
paul@233 5
paul@233 6
class C:
paul@233 7
    e = e
paul@233 8
paul@233 9
class D:
paul@233 10
    e = C.e
paul@233 11
paul@233 12
d = D()
paul@233 13
q = d.e # unbound C.e
paul@233 14
result_321 = q(123, 321)
paul@233 15
paul@233 16
# vim: tabstop=4 expandtab shiftwidth=4