Lichen

Annotated tests/nested_calls.py

852:7c314a9d1724
2018-07-12 Paul Boddie Attempt to reintroduce function acquisition optimisations by extending context tests related to invocations of access results.
paul@588 1
class C:
paul@588 2
    def __init__(self, x):
paul@588 3
        self.x = x
paul@588 4
paul@588 5
    def value(self):
paul@588 6
        return self.x
paul@588 7
paul@588 8
    def length(self):
paul@588 9
        return self.double(self.value())
paul@588 10
paul@588 11
    def double(self, x):
paul@588 12
        return x * 2
paul@588 13
paul@588 14
c = C(3)
paul@588 15
print c.length()                        # 6