t287.trans 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. Module(body=[FunctionDef(name='f',
  2. args=arguments(args=[],
  3. vararg=None,
  4. kwarg=None,
  5. defaults=[]),
  6. body=[Print(dest=None,
  7. values=[Str(s='in f')],
  8. nl=True),
  9. Return(value=Num(n=10))],
  10. decorator_list=[]),
  11. FunctionDef(name='g',
  12. args=arguments(args=[],
  13. vararg=None,
  14. kwarg=None,
  15. defaults=[]),
  16. body=[Print(dest=None,
  17. values=[Str(s='in g')],
  18. nl=True),
  19. Return(value=Num(n=20))],
  20. decorator_list=[]),
  21. Assign(targets=[Name(id='retval',
  22. ctx=Store())],
  23. value=Name(id='True',
  24. ctx=Load())),
  25. FunctionDef(name='h',
  26. args=arguments(args=[],
  27. vararg=None,
  28. kwarg=None,
  29. defaults=[]),
  30. body=[Global(names=['retval']),
  31. Assign(targets=[Name(id='retval',
  32. ctx=Store())],
  33. value=UnaryOp(op=Not(),
  34. operand=Name(id='retval',
  35. ctx=Load()))),
  36. Return(value=Name(id='retval',
  37. ctx=Load()))],
  38. decorator_list=[]),
  39. For(target=Name(id='i',
  40. ctx=Store()),
  41. iter=Call(func=Name(id='range',
  42. ctx=Load()),
  43. args=[Num(n=3)],
  44. keywords=[],
  45. starargs=None,
  46. kwargs=None),
  47. body=[Print(dest=None,
  48. values=[IfExp(test=Call(func=Name(id='h',
  49. ctx=Load()),
  50. args=[],
  51. keywords=[],
  52. starargs=None,
  53. kwargs=None),
  54. body=Call(func=Name(id='f',
  55. ctx=Load()),
  56. args=[],
  57. keywords=[],
  58. starargs=None,
  59. kwargs=None),
  60. orelse=Call(func=Name(id='g',
  61. ctx=Load()),
  62. args=[],
  63. keywords=[],
  64. starargs=None,
  65. kwargs=None))],
  66. nl=True)],
  67. orelse=[])])