t239.trans 5.3 KB

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