2007-09-06 | Paul Boddie | file changeset files shortlog | Added a fully-qualified name method for WithName-derived classes, producing a more usable global name for applications such as the viewer. Added a method for returning "visible" class attributes to GeneralClass. Added an attribute table production function for integration with the explicit distribution, along with a test program option for generating such a table. |
paulb@117 | 1 | class E: |
paulb@117 | 2 | def __init__(self, x): |
paulb@117 | 3 | pass |
paulb@117 | 4 | class F: |
paulb@111 | 5 | def __init__(self, x): |
paulb@111 | 6 | pass |
paulb@111 | 7 | |
paulb@111 | 8 | tb = None # NOTE: Traceback not supported yet. |
paulb@111 | 9 | x = 1 |
paulb@111 | 10 | |
paulb@117 | 11 | def f(x): |
paulb@117 | 12 | raise E, x |
paulb@117 | 13 | |
paulb@117 | 14 | def g(x): |
paulb@117 | 15 | try: |
paulb@117 | 16 | raise F(x) |
paulb@117 | 17 | except: |
paulb@117 | 18 | pass |
paulb@117 | 19 | |
paulb@117 | 20 | def h(x, tb): |
paulb@117 | 21 | try: |
paulb@117 | 22 | raise F, x, tb |
paulb@117 | 23 | except: |
paulb@117 | 24 | pass |
paulb@117 | 25 | |
paul@5 | 26 | try: |
paulb@117 | 27 | f(x) |
paulb@117 | 28 | g(x) |
paulb@117 | 29 | h(x, tb) |
paul@5 | 30 | except: |
paul@5 | 31 | pass |