2013-10-31 | Paul Boddie | file changeset files shortlog | Added remarks about local namespaces and name usage observations. | syspython-as-target |
paul@645 | 1 | #!/usr/bin/env python |
paul@645 | 2 | |
paul@645 | 3 | class C: |
paul@645 | 4 | x = 1 |
paul@645 | 5 | |
paul@645 | 6 | class D(C): |
paul@645 | 7 | pass |
paul@645 | 8 | |
paul@645 | 9 | def f(c): |
paul@645 | 10 | return c.x |
paul@645 | 11 | |
paul@645 | 12 | result_1 = f(C) |
paul@645 | 13 | result_2 = f(D) |
paul@645 | 14 | |
paul@645 | 15 | # vim: tabstop=4 expandtab shiftwidth=4 |