t222.trans 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. Module(body=[FunctionDef(name='foo',
  2. args=arguments(args=[Name(id='x',
  3. ctx=Param())],
  4. vararg=None,
  5. kwarg=None,
  6. defaults=[]),
  7. body=[Expr(value=Yield(value=Call(func=Name(id='len',
  8. ctx=Load()),
  9. args=[Name(id='x',
  10. ctx=Load())],
  11. keywords=[],
  12. starargs=None,
  13. kwargs=None))),
  14. Expr(value=Yield(value=Call(func=Name(id='len',
  15. ctx=Load()),
  16. args=[Name(id='x',
  17. ctx=Load())],
  18. keywords=[],
  19. starargs=None,
  20. kwargs=None)))],
  21. decorator_list=[]),
  22. Assign(targets=[Name(id='g',
  23. ctx=Store())],
  24. value=Call(func=Name(id='foo',
  25. ctx=Load()),
  26. args=[Call(func=Name(id='range',
  27. ctx=Load()),
  28. args=[Num(n=5)],
  29. keywords=[],
  30. starargs=None,
  31. kwargs=None)],
  32. keywords=[],
  33. starargs=None,
  34. kwargs=None)),
  35. Print(dest=None,
  36. values=[Call(func=Attribute(value=Name(id='g',
  37. ctx=Load()),
  38. attr='next',
  39. ctx=Load()),
  40. args=[],
  41. keywords=[],
  42. starargs=None,
  43. kwargs=None)],
  44. nl=True),
  45. Assign(targets=[Name(id='len',
  46. ctx=Store())],
  47. value=Lambda(args=arguments(args=[Name(id='y',
  48. ctx=Param())],
  49. vararg=None,
  50. kwarg=None,
  51. defaults=[]),
  52. body=Num(n=8))),
  53. Print(dest=None,
  54. values=[Call(func=Attribute(value=Name(id='g',
  55. ctx=Load()),
  56. attr='next',
  57. ctx=Load()),
  58. args=[],
  59. keywords=[],
  60. starargs=None,
  61. kwargs=None)],
  62. nl=True)])