t183.trans 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. Module(body=[FunctionDef(name='yrange',
  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. FunctionDef(name='creator',
  21. args=arguments(args=[],
  22. vararg=None,
  23. kwarg=None,
  24. defaults=[]),
  25. body=[Assign(targets=[Name(id='r',
  26. ctx=Store())],
  27. value=Call(func=Name(id='yrange',
  28. ctx=Load()),
  29. args=[Num(n=5)],
  30. keywords=[],
  31. starargs=None,
  32. kwargs=None)),
  33. Print(dest=None,
  34. values=[Str(s='creator'),
  35. Call(func=Attribute(value=Name(id='r',
  36. ctx=Load()),
  37. attr='next',
  38. ctx=Load()),
  39. args=[],
  40. keywords=[],
  41. starargs=None,
  42. kwargs=None)],
  43. nl=True),
  44. Return(value=Name(id='r',
  45. ctx=Load()))],
  46. decorator_list=[]),
  47. FunctionDef(name='caller',
  48. args=arguments(args=[],
  49. vararg=None,
  50. kwarg=None,
  51. defaults=[]),
  52. body=[Assign(targets=[Name(id='r',
  53. ctx=Store())],
  54. value=Call(func=Name(id='creator',
  55. ctx=Load()),
  56. args=[],
  57. keywords=[],
  58. starargs=None,
  59. kwargs=None)),
  60. For(target=Name(id='i',
  61. ctx=Store()),
  62. iter=Name(id='r',
  63. ctx=Load()),
  64. body=[Print(dest=None,
  65. values=[Str(s='caller'),
  66. Name(id='i',
  67. ctx=Load())],
  68. nl=True)],
  69. orelse=[])],
  70. decorator_list=[]),
  71. Expr(value=Call(func=Name(id='caller',
  72. ctx=Load()),
  73. args=[],
  74. keywords=[],
  75. starargs=None,
  76. kwargs=None))])