123456789101112131415161718192021222324252627282930313233343536373839404142 |
- Module(body=[ClassDef(name='X',
- bases=[],
- body=[Pass()],
- decorator_list=[]),
- Assign(targets=[Name(id='x',
- ctx=Store())],
- value=Call(func=Name(id='X',
- ctx=Load()),
- args=[],
- keywords=[],
- starargs=None,
- kwargs=None)),
- Assign(targets=[Name(id='methodName',
- ctx=Store())],
- value=Str(s='wee')),
- TryExcept(body=[Assign(targets=[Name(id='stuff',
- ctx=Store())],
- value=Call(func=Name(id='getattr',
- ctx=Load()),
- args=[Name(id='x',
- ctx=Load()),
- Name(id='methodName',
- ctx=Load())],
- keywords=[],
- starargs=None,
- kwargs=None))],
- handlers=[ExceptHandler(type=Name(id='AttributeError',
- ctx=Load()),
- name=None,
- body=[Raise(type=Name(id='ValueError',
- ctx=Load()),
- inst=BinOp(left=Str(s='no such method in %s: %s'),
- op=Mod(),
- right=Tuple(elts=[Attribute(value=Name(id='x',
- ctx=Load()),
- attr='__class__',
- ctx=Load()),
- Name(id='methodName',
- ctx=Load())],
- ctx=Load())),
- tback=None)])],
- orelse=[])])
|