2016-10-17 | Paul Boddie | file changeset files shortlog | Track attribute assignment in attribute usage in order to restrict accessors. Changed the function type to be separate from all other types, preventing special __fn__ and __args__ attribute shadowing. |
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) |