t392.trans 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. Module(body=[ClassDef(name='Ship',
  2. bases=[],
  3. body=[FunctionDef(name='__init__',
  4. args=arguments(args=[Name(id='self',
  5. ctx=Param()),
  6. Name(id='name',
  7. ctx=Param())],
  8. vararg=None,
  9. kwarg=None,
  10. defaults=[]),
  11. body=[Assign(targets=[Attribute(value=Name(id='self',
  12. ctx=Load()),
  13. attr='name',
  14. ctx=Store())],
  15. value=Name(id='name',
  16. ctx=Load())),
  17. Assign(targets=[Attribute(value=Name(id='self',
  18. ctx=Load()),
  19. attr='thrust',
  20. ctx=Store())],
  21. value=Name(id='False',
  22. ctx=Load()))],
  23. decorator_list=[]),
  24. FunctionDef(name='thrust',
  25. args=arguments(args=[Name(id='self',
  26. ctx=Param())],
  27. vararg=None,
  28. kwarg=None,
  29. defaults=[]),
  30. body=[Assign(targets=[Attribute(value=Name(id='self',
  31. ctx=Load()),
  32. attr='thrust',
  33. ctx=Store())],
  34. value=Name(id='True',
  35. ctx=Load())),
  36. Print(dest=None,
  37. values=[Str(s='Thrust'),
  38. Attribute(value=Name(id='self',
  39. ctx=Load()),
  40. attr='thrust',
  41. ctx=Load())],
  42. nl=True)],
  43. decorator_list=[])],
  44. decorator_list=[]),
  45. Assign(targets=[Name(id='my_ship',
  46. ctx=Store())],
  47. value=Call(func=Name(id='Ship',
  48. ctx=Load()),
  49. args=[Str(s='a_name')],
  50. keywords=[],
  51. starargs=None,
  52. kwargs=None)),
  53. Expr(value=Call(func=Attribute(value=Name(id='my_ship',
  54. ctx=Load()),
  55. attr='thrust',
  56. ctx=Load()),
  57. args=[],
  58. keywords=[],
  59. starargs=None,
  60. kwargs=None))])