2007-02-14 | paulb | file changeset files shortlog | Added a ResetExc node, used to clear the exception state upon entering a handler; introduced actual support for raised exceptions in handlers dealing with the same types of exceptions. Added tests of exception raising behaviour. Added types annotation of StoreName nodes. Fixed viewing of StoreName nodes and the ordering of scope and other pop-up information (as needed by Firefox). |
paulb@95 | 1 | class A1: |
paulb@95 | 2 | def __init__(self): |
paulb@95 | 3 | self.b = [] |
paulb@95 | 4 | |
paulb@95 | 5 | class A2: |
paulb@95 | 6 | def b(self): |
paulb@95 | 7 | return A3() |
paulb@95 | 8 | |
paulb@95 | 9 | class A3: |
paulb@95 | 10 | c = [] |
paulb@95 | 11 | |
paulb@95 | 12 | class A4: |
paulb@95 | 13 | def __getslice__(self, start=None, end=None, step=None): |
paulb@95 | 14 | return [] |
paulb@95 | 15 | def __getitem__(self, item): |
paulb@95 | 16 | return self |
paulb@95 | 17 | |
paulb@58 | 18 | a = [1,2,3] |
paulb@58 | 19 | b = [4,5] |
paulb@95 | 20 | c = [6] |
paulb@95 | 21 | d = [] |
paulb@95 | 22 | e = 1 |
paulb@95 | 23 | f = 2 |
paulb@95 | 24 | |
paul@2 | 25 | a += b |
paulb@95 | 26 | |
paulb@180 | 27 | a = A1() # May augment types since this is a global namespace. |
paul@2 | 28 | a.b += c |
paulb@95 | 29 | a.b[e:] += d |
paulb@95 | 30 | |
paulb@95 | 31 | a = A2() |
paul@2 | 32 | a.b().c += d |
paulb@95 | 33 | |
paulb@95 | 34 | a = A4() |
paulb@95 | 35 | a[e:f] += d |
paulb@95 | 36 | a[e] += c |
paulb@95 | 37 | a[e,f] += d |
paulb@180 | 38 | |
paulb@180 | 39 | def f(): |
paulb@180 | 40 | a = [1,2,3] |
paulb@180 | 41 | b = [4,5] |
paulb@180 | 42 | c = [6] |
paulb@180 | 43 | d = [] |
paulb@180 | 44 | e = 1 |
paulb@180 | 45 | f = 2 |
paulb@180 | 46 | |
paulb@180 | 47 | a += b |
paulb@180 | 48 | |
paulb@180 | 49 | a = A1() |
paulb@180 | 50 | a.b += c |
paulb@180 | 51 | a.b[e:] += d |
paulb@180 | 52 | |
paulb@180 | 53 | a = A2() |
paulb@180 | 54 | a.b().c += d |
paulb@180 | 55 | |
paulb@180 | 56 | a = A4() |
paulb@180 | 57 | a[e:f] += d |
paulb@180 | 58 | a[e] += c |
paulb@180 | 59 | a[e,f] += d |
paulb@180 | 60 | |
paulb@180 | 61 | f() |