Lichen

tests/nested.py

583:aed28d04304d
2017-02-13 Paul Boddie Re-added size information to string instances as the __size__ attribute. This fixes problems introduced when using strlen on data likely to contain embedded nulls, which was the reason for having size information explicitly stored in the first place. attr-strvalue-without-size
     1 a = 4     2      3 def f(x):     4     def g(y, x=x):     5         def h(z, x=x, y=y):     6             return x, y, z, a     7         return h     8     return g     9     10 fn = f(1)    11 print fn                        # __main__.f.$l0    12 print fn(2)                     # __main__.f.$l0.$l0    13 print fn(2)(3)                  # (1, 2, 3, 4)    14 print fn(2)(3, 5)               # (5, 2, 3, 4)    15 print fn(2)(3, 5, 6)            # (5, 6, 3, 4)