2016-11-19 | Paul Boddie | file changeset files shortlog | Make sure that structures are generated for functions whose names are reused and whose program locations therefore yield variable references. |
paul@2 | 1 | a = 4 |
paul@2 | 2 | |
paul@2 | 3 | def f(x): |
paul@43 | 4 | def g(y, x=x): |
paul@43 | 5 | def h(z, x=x, y=y): |
paul@2 | 6 | return x, y, z, a |
paul@2 | 7 | return h |
paul@2 | 8 | return g |
paul@2 | 9 | |
paul@2 | 10 | result = f(1)(2)(3) |
paul@2 | 11 | assert result == (1, 2, 3, 4) |