t147.trans 6.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. Module(body=[ClassDef(name='A',
  2. bases=[],
  3. body=[FunctionDef(name='__init__',
  4. args=arguments(args=[Name(id='self',
  5. ctx=Param())],
  6. vararg=None,
  7. kwarg=None,
  8. defaults=[]),
  9. body=[Print(dest=None,
  10. values=[Str(s='at0')],
  11. nl=True),
  12. Assign(targets=[Attribute(value=Name(id='self',
  13. ctx=Load()),
  14. attr='a',
  15. ctx=Store())],
  16. value=Str(s='O')),
  17. Assign(targets=[Attribute(value=Name(id='self',
  18. ctx=Load()),
  19. attr='b',
  20. ctx=Store())],
  21. value=Str(s='x'))],
  22. decorator_list=[]),
  23. FunctionDef(name='test',
  24. args=arguments(args=[Name(id='self',
  25. ctx=Param())],
  26. vararg=None,
  27. kwarg=None,
  28. defaults=[]),
  29. body=[Print(dest=None,
  30. values=[Str(s='KO')],
  31. nl=True)],
  32. decorator_list=[])],
  33. decorator_list=[]),
  34. ClassDef(name='B',
  35. bases=[Name(id='A',
  36. ctx=Load())],
  37. body=[FunctionDef(name='__init__',
  38. args=arguments(args=[Name(id='self',
  39. ctx=Param())],
  40. vararg=None,
  41. kwarg=None,
  42. defaults=[]),
  43. body=[Print(dest=None,
  44. values=[Str(s='at1')],
  45. nl=True),
  46. Expr(value=Call(func=Attribute(value=Name(id='A',
  47. ctx=Load()),
  48. attr='__init__',
  49. ctx=Load()),
  50. args=[Name(id='self',
  51. ctx=Load())],
  52. keywords=[],
  53. starargs=None,
  54. kwargs=None)),
  55. Assign(targets=[Attribute(value=Name(id='self',
  56. ctx=Load()),
  57. attr='b',
  58. ctx=Store())],
  59. value=Str(s='K'))],
  60. decorator_list=[]),
  61. FunctionDef(name='test',
  62. args=arguments(args=[Name(id='self',
  63. ctx=Param())],
  64. vararg=None,
  65. kwarg=None,
  66. defaults=[]),
  67. body=[Print(dest=None,
  68. values=[BinOp(left=Attribute(value=Name(id='self',
  69. ctx=Load()),
  70. attr='a',
  71. ctx=Load()),
  72. op=Add(),
  73. right=Attribute(value=Name(id='self',
  74. ctx=Load()),
  75. attr='b',
  76. ctx=Load()))],
  77. nl=True)],
  78. decorator_list=[])],
  79. decorator_list=[]),
  80. Print(dest=None,
  81. values=[Str(s='at2')],
  82. nl=True),
  83. Expr(value=Call(func=Attribute(value=Call(func=Name(id='B',
  84. ctx=Load()),
  85. args=[],
  86. keywords=[],
  87. starargs=None,
  88. kwargs=None),
  89. attr='test',
  90. ctx=Load()),
  91. args=[],
  92. keywords=[],
  93. starargs=None,
  94. kwargs=None)),
  95. Print(dest=None,
  96. values=[Str(s='at3')],
  97. nl=True)])