t358.trans 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. Module(body=[ClassDef(name='obj',
  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=[Assign(targets=[Attribute(value=Name(id='self',
  10. ctx=Load()),
  11. attr='num',
  12. ctx=Store())],
  13. value=Num(n=2))],
  14. decorator_list=[]),
  15. FunctionDef(name='delete',
  16. args=arguments(args=[Name(id='self',
  17. ctx=Param())],
  18. vararg=None,
  19. kwarg=None,
  20. defaults=[]),
  21. body=[Print(dest=None,
  22. values=[Attribute(value=Name(id='self',
  23. ctx=Load()),
  24. attr='num',
  25. ctx=Load())],
  26. nl=True)],
  27. decorator_list=[]),
  28. FunctionDef(name='abc',
  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=Attribute(value=Name(id='self',
  36. ctx=Load()),
  37. attr='num',
  38. ctx=Load()),
  39. op=Add(),
  40. right=Num(n=1))],
  41. nl=True)],
  42. decorator_list=[])],
  43. decorator_list=[]),
  44. Assign(targets=[Name(id='a',
  45. ctx=Store())],
  46. value=Call(func=Name(id='obj',
  47. ctx=Load()),
  48. args=[],
  49. keywords=[],
  50. starargs=None,
  51. kwargs=None)),
  52. Expr(value=Call(func=Attribute(value=Name(id='a',
  53. ctx=Load()),
  54. attr='abc',
  55. ctx=Load()),
  56. args=[],
  57. keywords=[],
  58. starargs=None,
  59. kwargs=None)),
  60. Expr(value=Call(func=Attribute(value=Name(id='a',
  61. ctx=Load()),
  62. attr='delete',
  63. ctx=Load()),
  64. args=[],
  65. keywords=[],
  66. starargs=None,
  67. kwargs=None))])