t541.trans 6.2 KB

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