123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- Module(body=[ClassDef(name='Base',
- bases=[Name(id='object',
- ctx=Load())],
- body=[FunctionDef(name='myfunc',
- args=arguments(args=[Name(id='self',
- ctx=Param())],
- vararg=None,
- kwarg=None,
- defaults=[]),
- body=[Print(dest=None,
- values=[Str(s='Base.myfunc')],
- nl=True)],
- decorator_list=[]),
- FunctionDef(name='stuff',
- args=arguments(args=[Name(id='self',
- ctx=Param())],
- vararg=None,
- kwarg=None,
- defaults=[]),
- body=[Print(dest=None,
- values=[Str(s='Base.stuff')],
- nl=True),
- Expr(value=Call(func=Attribute(value=Name(id='self',
- ctx=Load()),
- attr='myfunc',
- ctx=Load()),
- args=[],
- keywords=[],
- starargs=None,
- kwargs=None))],
- decorator_list=[])],
- decorator_list=[]),
- ClassDef(name='Derived',
- bases=[Name(id='Base',
- ctx=Load())],
- body=[FunctionDef(name='myfunc',
- args=arguments(args=[Name(id='self',
- ctx=Param())],
- vararg=None,
- kwarg=None,
- defaults=[]),
- body=[Expr(value=Call(func=Attribute(value=Name(id='Base',
- ctx=Load()),
- attr='myfunc',
- ctx=Load()),
- args=[Name(id='self',
- ctx=Load())],
- keywords=[],
- starargs=None,
- kwargs=None)),
- Print(dest=None,
- values=[Str(s='Derived.myfunc')],
- nl=True)],
- decorator_list=[])],
- decorator_list=[]),
- Assign(targets=[Name(id='d',
- ctx=Store())],
- value=Call(func=Name(id='Derived',
- ctx=Load()),
- args=[],
- keywords=[],
- starargs=None,
- kwargs=None)),
- Expr(value=Call(func=Attribute(value=Name(id='d',
- ctx=Load()),
- attr='myfunc',
- ctx=Load()),
- args=[],
- keywords=[],
- starargs=None,
- kwargs=None)),
- Assign(targets=[Name(id='b',
- ctx=Store())],
- value=Call(func=Name(id='Derived',
- ctx=Load()),
- args=[],
- keywords=[],
- starargs=None,
- kwargs=None)),
- Expr(value=Call(func=Attribute(value=Name(id='b',
- ctx=Load()),
- attr='stuff',
- ctx=Load()),
- args=[],
- keywords=[],
- starargs=None,
- kwargs=None))])
|