Lichen

tests/nested_lambda.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 a = 4     2      3 def f(x):     4     g = lambda y, x=x: lambda z, x=x, y=y: (x, y, z, a)     5     return g     6      7 result = f(1)(2)(3)     8 print result[0]     9 print result[1]    10 print result[2]    11 print result[3]    12 assert result == (1, 2, 3, 4)