Lichen

tests/methods_attr_init_bad.py

934:2989aab1b4f7
7 months ago Paul Boddie Renamed the utf8string class to unicode, eliminating the unicode function. This means that the simple case of merely returning an object if it is already a Unicode object no longer occurs when using the unicode callable, but such behaviour might be better supported with more general customised instantiation functionality.
     1 class C:     2     def __init__(.x, .y, .z, x): # no explicit self, attributes initialised     3         pass     4      5     def c():     6         return self.x     7      8 class D(C):     9     def d():    10         return self.y    11     12 class E(D):    13     def c():    14         return self.z    15     16 c = C(1, 2, 3, 4)    17 d = D(1, 2, 3, 4)    18 e = E(1, 2, 3, 4)    19     20 print c.c() # 1    21 print d.c() # 1    22 print e.c() # 3    23 print d.d() # 2    24 print e.d() # 2