2007-04-01 | paulb | file changeset files shortlog | Made the recording of return types and exceptions on function nodes annotation operations, fixing a lack of analysis on recursive functions. Changed the handling of constants so that Constant objects are not loaded as references - instead, instances are created dynamically. Changed the __atomic__ attributes in the built-in classes to use the "object" name already defined, thus avoiding issues with the initialisation order of built-in classes. Fixed a docstring in the simplified module. |
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@133 | 21 | return a |
paulb@122 | 22 | |
paulb@122 | 23 | f() |