Lichen

tests/list.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 l = [1, 2, 3]     2 l.append("four")     3 print len(l)     4 print l[0]     5 print l[1]     6 print l[2]     7 print l[3]     8 print l[-1]     9 print l[-2]    10 print l[-3]    11 print l[-4]    12 print l    13     14 t = (1, 2, 3, "four")    15 l = list(t)    16 print l