2013-07-01 | Paul Boddie | raw annotate files changeset graph | 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 |
1 #!/usr/bin/env python 2 3 import imported 4 5 class C: # hack: make an attribute called y known to the system 6 y = None # hack: this prevents compilation errors with the statements 7 # hack: below 8 9 n = None 10 n = imported 11 n.a = 1 # not detected due to reassignment of n 12 n.y = 2 # not detected due to reassignment of n 13 n.y = 3 # not detected due to reassignment of n 14 15 # vim: tabstop=4 expandtab shiftwidth=4