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@212 | 1 | #!/usr/bin/env python |
paul@212 | 2 | |
paul@212 | 3 | class C: |
paul@212 | 4 | def __init__(self, x, y, z): |
paul@212 | 5 | self.x = x |
paul@212 | 6 | self.y = y |
paul@212 | 7 | self.z = z |
paul@212 | 8 | |
paul@212 | 9 | c = C(1, 2, z=3) |
paul@230 | 10 | result_1 = c.x |
paul@230 | 11 | result_2 = c.y |
paul@230 | 12 | result_3 = c.z |
paul@212 | 13 | |
paul@212 | 14 | # vim: tabstop=4 expandtab shiftwidth=4 |