2009-06-02 | Paul Boddie | file changeset files shortlog | Introduced a separate globals processing phase, recording all declared global names before attempting to resolve other names. Removed the Global class and warning about globals not being declared at the module level. Added tests of globals. |
paul@236 | 1 | #!/usr/bin/env python |
paul@236 | 2 | |
paul@236 | 3 | def f(x): |
paul@236 | 4 | return g(x) |
paul@236 | 5 | |
paul@236 | 6 | def g(x): |
paul@236 | 7 | return x |
paul@236 | 8 | |
paul@236 | 9 | result_13579 = f(13579) |
paul@236 | 10 | |
paul@236 | 11 | # vim: tabstop=4 expandtab shiftwidth=4 |