t230.trans 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. Module(body=[FunctionDef(name='f',
  2. args=arguments(args=[Name(id='n',
  3. ctx=Param())],
  4. vararg=None,
  5. kwarg=None,
  6. defaults=[]),
  7. body=[For(target=Name(id='i',
  8. ctx=Store()),
  9. iter=Call(func=Name(id='range',
  10. ctx=Load()),
  11. args=[Name(id='n',
  12. ctx=Load())],
  13. keywords=[],
  14. starargs=None,
  15. kwargs=None),
  16. body=[Expr(value=Yield(value=Name(id='i',
  17. ctx=Load())))],
  18. orelse=[])],
  19. decorator_list=[]),
  20. Assign(targets=[Name(id='g',
  21. ctx=Store())],
  22. value=Call(func=Name(id='f',
  23. ctx=Load()),
  24. args=[Num(n=5)],
  25. keywords=[],
  26. starargs=None,
  27. kwargs=None)),
  28. Print(dest=None,
  29. values=[Call(func=Attribute(value=Name(id='g',
  30. ctx=Load()),
  31. attr='next',
  32. ctx=Load()),
  33. args=[],
  34. keywords=[],
  35. starargs=None,
  36. kwargs=None)],
  37. nl=True),
  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),
  48. Print(dest=None,
  49. values=[Call(func=Attribute(value=Name(id='g',
  50. ctx=Load()),
  51. attr='next',
  52. ctx=Load()),
  53. args=[],
  54. keywords=[],
  55. starargs=None,
  56. kwargs=None)],
  57. nl=True),
  58. Print(dest=None,
  59. values=[Call(func=Attribute(value=Name(id='g',
  60. ctx=Load()),
  61. attr='next',
  62. ctx=Load()),
  63. args=[],
  64. keywords=[],
  65. starargs=None,
  66. kwargs=None)],
  67. nl=True)])