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@135 | 1 | def f(l): |
paulb@135 | 2 | for i in l: |
paulb@135 | 3 | if i == 3: |
paulb@135 | 4 | return 1 |
paulb@135 | 5 | elif i == 4: |
paulb@135 | 6 | break |
paulb@135 | 7 | return "1" |
paulb@135 | 8 | |
paulb@135 | 9 | x = f([1, 2, 3, 4, 5]) |