t187.trans 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. Module(body=[FunctionDef(name='gen',
  2. args=arguments(args=[],
  3. vararg=None,
  4. kwarg=None,
  5. defaults=[]),
  6. body=[Assign(targets=[Name(id='i',
  7. ctx=Store())],
  8. value=Num(n=0)),
  9. Expr(value=Call(func=Name(id='funky',
  10. ctx=Load()),
  11. args=[],
  12. keywords=[],
  13. starargs=None,
  14. kwargs=None)),
  15. Expr(value=Yield(value=Num(n=1))),
  16. AugAssign(target=Name(id='i',
  17. ctx=Store()),
  18. op=Add(),
  19. value=Num(n=1))],
  20. decorator_list=[]),
  21. FunctionDef(name='funky',
  22. args=arguments(args=[],
  23. vararg=None,
  24. kwarg=None,
  25. defaults=[]),
  26. body=[Print(dest=None,
  27. values=[Str(s='cheese')],
  28. nl=True)],
  29. decorator_list=[]),
  30. Assign(targets=[Name(id='g',
  31. ctx=Store())],
  32. value=Call(func=Name(id='gen',
  33. ctx=Load()),
  34. args=[],
  35. keywords=[],
  36. starargs=None,
  37. kwargs=None)),
  38. Print(dest=None,
  39. values=[Call(func=Attribute(value=Name(id='g',
  40. ctx=Load()),
  41. attr='next',
  42. ctx=Load()),
  43. args=[],
  44. keywords=[],
  45. starargs=None,
  46. kwargs=None)],
  47. nl=True)])