2007-02-14 | paulb | file changeset files shortlog | Changed comparison operations to use the same infrastructure as normal binary operations, modifying that infrastructure slightly. Introduced a special AST-style node for improved viewer referencing of the operations. |
paulb@168 | 1 | class A: |
paulb@168 | 2 | pass |
paulb@168 | 3 | |
paulb@168 | 4 | def f(x): |
paulb@168 | 5 | try: |
paulb@168 | 6 | try: |
paulb@168 | 7 | y = x.attr |
paulb@168 | 8 | except AttributeError, e: |
paulb@168 | 9 | f = e |
paulb@168 | 10 | except Exception, e: |
paulb@168 | 11 | f = e |
paulb@168 | 12 | return f |
paulb@168 | 13 | |
paulb@168 | 14 | x = A() |
paulb@168 | 15 | f(x) |