Lichen

tests/nested_bad.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 def f(x):     2     def g(y, x=x):     3         while 1:     4             def h(z, x=x, y=y):     5                 return x, y, z, a     6             a = 4 # not available for h, available in Python     7             return h     8     return g     9     10 result = f(1)(2)(3)    11 assert result == (1, 2, 3, 4)