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@96 | 1 | #!/usr/bin/env python |
paul@96 | 2 | |
paul@96 | 3 | import imported |
paul@96 | 4 | |
paul@242 | 5 | result_123 = imported.attr # cannot assign to this |
paul@96 | 6 | |
paul@96 | 7 | m = imported |
paul@242 | 8 | result1_10 = imported.a # can only read from the attribute, not replace it |
paul@242 | 9 | result2_10 = m.a # can only read from the attribute (m is known) |
paul@96 | 10 | |
paul@96 | 11 | # vim: tabstop=4 expandtab shiftwidth=4 |