Lichen

tests/chain.py

73:c2f5fbca47cf
2016-09-30 Paul Boddie Permit class base lookup within local class namespaces.
     1 class C:     2     class D:     3         class E:     4             def m(self, x):     5                 self.x = x     6                 l = self.x.__len__     7                 s = self.o     8                 return self.o.__len__     9             n = 123    10             o = "123"    11         p = "456"    12         q = 789    13     14 def main():    15     c = C    16     d = C.D    17     e = C.D.E    18     f = C.D.E.m    19     g = C.D.E.n    20     h = C.D.p    21     i = C.D.p.__len__    22     C.D.q = 987    23     inst = e()    24     method = inst.m    25     return method("5")    26     27 result1 = main()    28 c = C    29 d = C.D    30 e = C.D.E    31 f = C.D.E.m    32 g = C.D.E.n    33 h = C.D.p    34 i = C.D.p.__len__    35 C.D.q = 987    36 inst = e()    37 method = inst.m    38 result2 = method("5")