2013-10-26 | Paul Boddie | file changeset files shortlog | Introduced dynamic attribute construction from path-sensitive information. | syspython-as-target |
paul@628 | 1 | #!/usr/bin/env python |
paul@628 | 2 | |
paul@628 | 3 | class A: |
paul@628 | 4 | x = 1 |
paul@628 | 5 | |
paul@628 | 6 | class B(A): |
paul@628 | 7 | y = 2 |
paul@628 | 8 | |
paul@630 | 9 | result_2 = B.y |
paul@630 | 10 | |
paul@628 | 11 | class B(A): |
paul@628 | 12 | z = 3 |
paul@628 | 13 | |
paul@628 | 14 | result_1 = A.x |
paul@628 | 15 | result_3 = B.z |
paul@628 | 16 | |
paul@628 | 17 | # vim: tabstop=4 expandtab shiftwidth=4 |