2010-06-12 | Paul Boddie | file changeset files shortlog | Fixed scope handling where names are imported into namespaces. Added a simple iter built-in function. Made the xrange test use the iteration protocol. |
paul@331 | 1 | #!/usr/bin/env python |
paul@331 | 2 | |
paul@331 | 3 | d = 2 |
paul@331 | 4 | d = 4 # make non-constant |
paul@331 | 5 | |
paul@331 | 6 | def f(a, b, c=d): |
paul@331 | 7 | return c |
paul@331 | 8 | |
paul@331 | 9 | result_3 = f(1, 2, 3) |
paul@331 | 10 | result_4 = f(1, 2) |
paul@331 | 11 | |
paul@331 | 12 | # vim: tabstop=4 expandtab shiftwidth=4 |