2016-09-08 | Paul Boddie | file changeset files shortlog | Changed nested scope tests to work without implicit name propagation. |
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(a, z, x=x, y=y): |
paul@43 | 6 | return x, y, z, a # parameter a overrides global scope |
paul@2 | 7 | return h |
paul@2 | 8 | return g |
paul@2 | 9 | |
paul@2 | 10 | result = f(1)(2)(5, 3) |
paul@43 | 11 | assert result == (1, 2, 3, 5) |