12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- Module(body=[FunctionDef(name='yrange',
- args=arguments(args=[Name(id='n',
- ctx=Param())],
- vararg=None,
- kwarg=None,
- defaults=[]),
- body=[For(target=Name(id='i',
- ctx=Store()),
- iter=Call(func=Name(id='range',
- ctx=Load()),
- args=[Name(id='n',
- ctx=Load())],
- keywords=[],
- starargs=None,
- kwargs=None),
- body=[Expr(value=Yield(value=Name(id='i',
- ctx=Load())))],
- orelse=[])],
- decorator_list=[]),
- FunctionDef(name='creator',
- args=arguments(args=[],
- vararg=None,
- kwarg=None,
- defaults=[]),
- body=[Assign(targets=[Name(id='r',
- ctx=Store())],
- value=Call(func=Name(id='yrange',
- ctx=Load()),
- args=[Num(n=5)],
- keywords=[],
- starargs=None,
- kwargs=None)),
- Print(dest=None,
- values=[Str(s='creator'),
- Call(func=Attribute(value=Name(id='r',
- ctx=Load()),
- attr='next',
- ctx=Load()),
- args=[],
- keywords=[],
- starargs=None,
- kwargs=None)],
- nl=True),
- Return(value=Name(id='r',
- ctx=Load()))],
- decorator_list=[]),
- FunctionDef(name='caller',
- args=arguments(args=[],
- vararg=None,
- kwarg=None,
- defaults=[]),
- body=[Assign(targets=[Name(id='r',
- ctx=Store())],
- value=Call(func=Name(id='creator',
- ctx=Load()),
- args=[],
- keywords=[],
- starargs=None,
- kwargs=None)),
- For(target=Name(id='i',
- ctx=Store()),
- iter=Name(id='r',
- ctx=Load()),
- body=[Print(dest=None,
- values=[Str(s='caller'),
- Name(id='i',
- ctx=Load())],
- nl=True)],
- orelse=[])],
- decorator_list=[]),
- Expr(value=Call(func=Name(id='caller',
- ctx=Load()),
- args=[],
- keywords=[],
- starargs=None,
- kwargs=None))])
|