2007-06-18 | paulb | file changeset files shortlog | Redefined the get_distinct_instances method on _Class to return a dictionary mapping instances to distinct instances. Added a program fixer which replaces instances with those from a distinct set for each class. Updated the viewer and test program to show only distinct instances when requested. |
paulb@107 | 1 | class X: |
paulb@107 | 2 | def y(self): pass |
paulb@107 | 3 | class Y: |
paulb@107 | 4 | def x(self): pass |
paulb@107 | 5 | x = X() |
paulb@107 | 6 | y = Y() |
paul@0 | 7 | try: |
paul@0 | 8 | x.y() |
paul@0 | 9 | finally: |
paul@0 | 10 | y.x() |