2013-07-01 | Paul Boddie | file changeset files shortlog | Introduced numbered functions where rebinding occurs in namespaces. Added an original name attribute to classes and functions, revised the check for usage of functions when generating code or reports, and added rebinding statements to module "main program" syspython output. Fixed the attribute operation generated by syspython when acquiring module attributes for a "from" statement. | syspython-as-target |
paul@412 | 1 | #!/usr/bin/env python |
paul@412 | 2 | |
paul@412 | 3 | class C: |
paul@412 | 4 | x = 1 |
paul@412 | 5 | |
paul@412 | 6 | class D: |
paul@412 | 7 | x = 2 |
paul@412 | 8 | |
paul@412 | 9 | def f(c): |
paul@412 | 10 | return c.x |
paul@412 | 11 | |
paul@412 | 12 | result_1 = f(C) |
paul@412 | 13 | result_2 = f(D) |
paul@412 | 14 | |
paul@412 | 15 | # vim: tabstop=4 expandtab shiftwidth=4 |