Lichen

tests/aliases.py

227:3a4ba5788f0f
2016-11-23 Paul Boddie Fixed list and tuple initialisation via their initialisers. Introduced generic string representation support for sequences. Removed superfluous tuple native functions. Added element-setting and size-setting native functions for fragments. Added __setitem__ support for sequences. Added initialisation and serialisation tests for lists and tuples.
     1 class C:     2     def m(self):     3         return 1     4      5 D = C # alias for C     6      7 class E:     8     def m(self):     9         return 2    10     11 F = E # alias for E    12     13 def f():    14     c = C    15     d = D       # C    16     cm = C.m    17     dm = D.m    # C.m    18     19     c = E    20     d = F       # E    21     cm = E.m    22     dm = F.m    # E.m    23     24 Cm = C.m    25 Dm = D.m    26 Em = E.m    27 Fm = F.m    28     29 def g():    30     Cm = E.m    31     Dm = F.m    # E.m    32     33 def h():    34     global Em, Fm    35     Em = C.m    36     Fm = D.m    # C.m    37     38 Ci = C()    39 Ei = E()    40     41 def i():    42     c = Ci    43     c = Ei    44     45 def j():    46     global Ei    47     Ei = C()    48     49 L = []    50 M = [1]    51     52 def k():    53     c = L    54     55 def l():    56     global M    57     M = []