2016-08-30 | Paul Boddie | file changeset files shortlog | Added tests from PythonLight. |
paul@2 | 1 | a = 4 |
paul@2 | 2 | |
paul@2 | 3 | def f(x): |
paul@2 | 4 | def g(y): |
paul@2 | 5 | def h(y, z): |
paul@2 | 6 | return x, y, z, a # parameter y overrides outer scope |
paul@2 | 7 | return h |
paul@2 | 8 | return g |
paul@2 | 9 | |
paul@2 | 10 | result = f(1)(2)(5, 3) |
paul@2 | 11 | assert result == (1, 5, 3, 4) |