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@573 | 1 | #!/usr/bin/env python |
paul@573 | 2 | |
paul@573 | 3 | import changed2 # access the package root |
paul@573 | 4 | |
paul@573 | 5 | def change(): |
paul@573 | 6 | |
paul@573 | 7 | "Change x in the partially imported module." |
paul@573 | 8 | |
paul@573 | 9 | changed2.x = 456 |
paul@573 | 10 | |
paul@573 | 11 | change() |
paul@573 | 12 | |
paul@573 | 13 | # Attempt to confuse the identity of changed2 for the function. |
paul@573 | 14 | |
paul@573 | 15 | changed2 = None |
paul@573 | 16 | |
paul@573 | 17 | # vim: tabstop=4 expandtab shiftwidth=4 |