2008-09-05 | Paul Boddie | raw annotate files changeset graph | Added the final Return instruction to generated images. Fixed the For node processing to store assigned values before visiting assignment nodes. Changed source processing to not use temporary storage optimisations, since the conditions for such optimisations are not met in general when processing assignments. Adopted a list to hold sources (assignment expression values), since list and tuple assignment act on a hierarchy of such values. Added elementary support and tests for list assignment. |
1 #!/usr/bin/env python 2 3 class A: 4 pass 5 6 class B: 7 def f(self): 8 pass 9 10 def f(x): 11 pass 12 13 b = B() 14 15 # on A on a 16 A.f1 = f # unbound bound (a) 17 A.f2 = B.f # unbound unbound 18 A.f3 = b.f # bound (b) bound (b) 19 a = A() 20 a.f4 = f # N/A function 21 a.f5 = B.f # N/A unbound 22 a.f6 = b.f # N/A bound (b) 23 24 # vim: tabstop=4 expandtab shiftwidth=4