2007-06-24 | paulb | file changeset files shortlog | Replaced the generic tuple/list assignment mechanism with specific access to a special __value__<n> attributes, providing improved precision in programs which employ such sequence assignments. Added tests of such assignments. |
paulb@201 | 1 | def f(x, y): |
paulb@201 | 2 | return x |
paulb@201 | 3 | |
paulb@201 | 4 | a = [1, 2, 3] |
paulb@201 | 5 | b = ["1", "2", "3"] |
paulb@201 | 6 | |
paulb@201 | 7 | l = [f(x, y) for x in a for y in b if y > "1" if x > 1] |
paulb@253 | 8 | l2 = [f(x, 2) for x in xrange(0, 10)] |
paulb@253 | 9 | |
paulb@253 | 10 | def test(a, b): |
paulb@253 | 11 | for y in a: |
paulb@253 | 12 | l2 = [f(x, 2) for x in xrange(0, 10)] |
paulb@253 | 13 | |
paulb@253 | 14 | test(a, b) |