t407.trans 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. Module(body=[ClassDef(name='A',
  2. bases=[Name(id='object',
  3. ctx=Load())],
  4. body=[FunctionDef(name='__init__',
  5. args=arguments(args=[Name(id='self',
  6. ctx=Param())],
  7. vararg=None,
  8. kwarg=None,
  9. defaults=[]),
  10. body=[Assign(targets=[Attribute(value=Name(id='self',
  11. ctx=Load()),
  12. attr='a',
  13. ctx=Store())],
  14. value=Num(n=1)),
  15. Assign(targets=[Attribute(value=Name(id='self',
  16. ctx=Load()),
  17. attr='b',
  18. ctx=Store())],
  19. value=Num(n=2)),
  20. Assign(targets=[Attribute(value=Name(id='self',
  21. ctx=Load()),
  22. attr='c',
  23. ctx=Store())],
  24. value=Num(n=3))],
  25. decorator_list=[])],
  26. decorator_list=[]),
  27. ClassDef(name='B',
  28. bases=[Name(id='A',
  29. ctx=Load())],
  30. body=[FunctionDef(name='__init__',
  31. args=arguments(args=[Name(id='self',
  32. ctx=Param())],
  33. vararg=None,
  34. kwarg=None,
  35. defaults=[]),
  36. body=[Expr(value=Call(func=Attribute(value=Name(id='A',
  37. ctx=Load()),
  38. attr='__init__',
  39. ctx=Load()),
  40. args=[Name(id='self',
  41. ctx=Load())],
  42. keywords=[],
  43. starargs=None,
  44. kwargs=None)),
  45. Assign(targets=[Attribute(value=Name(id='self',
  46. ctx=Load()),
  47. attr='d',
  48. ctx=Store())],
  49. value=Num(n=4))],
  50. decorator_list=[])],
  51. decorator_list=[]),
  52. ClassDef(name='C',
  53. bases=[Name(id='B',
  54. ctx=Load())],
  55. body=[FunctionDef(name='__init__',
  56. args=arguments(args=[Name(id='self',
  57. ctx=Param())],
  58. vararg=None,
  59. kwarg=None,
  60. defaults=[]),
  61. body=[Expr(value=Call(func=Attribute(value=Name(id='B',
  62. ctx=Load()),
  63. attr='__init__',
  64. ctx=Load()),
  65. args=[Name(id='self',
  66. ctx=Load())],
  67. keywords=[],
  68. starargs=None,
  69. kwargs=None))],
  70. decorator_list=[]),
  71. FunctionDef(name='__dir__',
  72. args=arguments(args=[Name(id='self',
  73. ctx=Param())],
  74. vararg=None,
  75. kwarg=None,
  76. defaults=[]),
  77. body=[Return(value=List(elts=[Str(s='a'),
  78. Str(s='b'),
  79. Str(s='c'),
  80. Str(s='d')],
  81. ctx=Load()))],
  82. decorator_list=[])],
  83. decorator_list=[]),
  84. Print(dest=None,
  85. values=[Call(func=Name(id='dir',
  86. ctx=Load()),
  87. args=[Call(func=Name(id='A',
  88. ctx=Load()),
  89. args=[],
  90. keywords=[],
  91. starargs=None,
  92. kwargs=None)],
  93. keywords=[],
  94. starargs=None,
  95. kwargs=None)],
  96. nl=True),
  97. Print(dest=None,
  98. values=[Call(func=Name(id='dir',
  99. ctx=Load()),
  100. args=[Call(func=Name(id='B',
  101. ctx=Load()),
  102. args=[],
  103. keywords=[],
  104. starargs=None,
  105. kwargs=None)],
  106. keywords=[],
  107. starargs=None,
  108. kwargs=None)],
  109. nl=True),
  110. Print(dest=None,
  111. values=[Call(func=Name(id='dir',
  112. ctx=Load()),
  113. args=[Call(func=Name(id='C',
  114. ctx=Load()),
  115. args=[],
  116. keywords=[],
  117. starargs=None,
  118. kwargs=None)],
  119. keywords=[],
  120. starargs=None,
  121. kwargs=None)],
  122. nl=True)])