2006-10-30 | paulb | file changeset files shortlog | Added attribute test. Enhanced the exceptions test to use a function. |
paulb@107 | 1 | class A: |
paulb@107 | 2 | pass |
paulb@107 | 3 | class B: |
paulb@107 | 4 | pass |
paulb@107 | 5 | class C: |
paulb@107 | 6 | pass |
paulb@122 | 7 | |
paulb@122 | 8 | def f(): |
paulb@122 | 9 | x = 1 |
paulb@122 | 10 | try: |
paulb@122 | 11 | if x: |
paulb@122 | 12 | raise A |
paulb@122 | 13 | else: |
paulb@122 | 14 | raise B |
paulb@122 | 15 | except A, e: |
paulb@122 | 16 | a = e |
paulb@122 | 17 | except (B, C), f: |
paulb@122 | 18 | a = f |
paulb@111 | 19 | else: |
paulb@122 | 20 | a = x |
paulb@122 | 21 | |
paulb@122 | 22 | f() |