t533.trans 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. Module(body=[FunctionDef(name='foo',
  2. args=arguments(args=[],
  3. vararg=None,
  4. kwarg=None,
  5. defaults=[]),
  6. body=[Pass()],
  7. decorator_list=[]),
  8. Assign(targets=[Name(id='bar',
  9. ctx=Store())],
  10. value=Num(n=11)),
  11. Print(dest=None,
  12. values=[Subscript(value=Call(func=Name(id='globals',
  13. ctx=Load()),
  14. args=[],
  15. keywords=[],
  16. starargs=None,
  17. kwargs=None),
  18. slice=Index(value=Str(s='bar')),
  19. ctx=Load())],
  20. nl=True),
  21. Print(dest=None,
  22. values=[Compare(left=Str(s='foo'),
  23. ops=[In()],
  24. comparators=[Call(func=Name(id='globals',
  25. ctx=Load()),
  26. args=[],
  27. keywords=[],
  28. starargs=None,
  29. kwargs=None)])],
  30. nl=True),
  31. FunctionDef(name='baz',
  32. args=arguments(args=[Name(id='x',
  33. ctx=Param())],
  34. vararg=None,
  35. kwarg=None,
  36. defaults=[]),
  37. body=[Print(dest=None,
  38. values=[Compare(left=Str(s='baz'),
  39. ops=[In()],
  40. comparators=[Call(func=Name(id='globals',
  41. ctx=Load()),
  42. args=[],
  43. keywords=[],
  44. starargs=None,
  45. kwargs=None)])],
  46. nl=True)],
  47. decorator_list=[]),
  48. Expr(value=Call(func=Name(id='baz',
  49. ctx=Load()),
  50. args=[Num(n=10)],
  51. keywords=[],
  52. starargs=None,
  53. kwargs=None)),
  54. ClassDef(name='MyClass',
  55. bases=[],
  56. body=[FunctionDef(name='__init__',
  57. args=arguments(args=[Name(id='self',
  58. ctx=Param())],
  59. vararg=None,
  60. kwarg=None,
  61. defaults=[]),
  62. body=[Print(dest=None,
  63. values=[Subscript(value=Call(func=Name(id='globals',
  64. ctx=Load()),
  65. args=[],
  66. keywords=[],
  67. starargs=None,
  68. kwargs=None),
  69. slice=Index(value=Str(s='__name__')),
  70. ctx=Load())],
  71. nl=True),
  72. Print(dest=None,
  73. values=[Compare(left=Str(s='MyClass'),
  74. ops=[In()],
  75. comparators=[Call(func=Name(id='globals',
  76. ctx=Load()),
  77. args=[],
  78. keywords=[],
  79. starargs=None,
  80. kwargs=None)])],
  81. nl=True),
  82. Print(dest=None,
  83. values=[Call(func=Name(id='type',
  84. ctx=Load()),
  85. args=[Subscript(value=Call(func=Name(id='globals',
  86. ctx=Load()),
  87. args=[],
  88. keywords=[],
  89. starargs=None,
  90. kwargs=None),
  91. slice=Index(value=Str(s='baz')),
  92. ctx=Load())],
  93. keywords=[],
  94. starargs=None,
  95. kwargs=None)],
  96. nl=True)],
  97. decorator_list=[])],
  98. decorator_list=[]),
  99. Assign(targets=[Name(id='y',
  100. ctx=Store())],
  101. value=Call(func=Name(id='MyClass',
  102. ctx=Load()),
  103. args=[],
  104. keywords=[],
  105. starargs=None,
  106. kwargs=None))])