Lichen

tests/nested_bad.py

292:436d7832ca66
2016-12-01 Paul Boddie Introduced the itemaccess class as the base of sequence types and strings. Added support for obtaining substrings from strings. Added tests of string operations. Removed the superfluous _tuple function from the sequence module.
     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)