Lichen

tests/nested.py

319:e39bf1c565b8
2016-12-05 Paul Boddie Changed multiple assignment detection to distinguish between different objects of the same kind.
     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)