Lichen

tests/nested_calls.py

602:fcb8c13028d5
2017-02-19 Paul Boddie Replaced context test macros with functions to avoid evaluation order errors. method-wrapper-for-context
     1 class C:     2     def __init__(self, x):     3         self.x = x     4      5     def value(self):     6         return self.x     7      8     def length(self):     9         return self.double(self.value())    10     11     def double(self, x):    12         return x * 2    13     14 c = C(3)    15 print c.length()                        # 6