t544.trans 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. Module(body=[ImportFrom(module='time',
  2. names=[alias(name='sleep',
  3. asname=None)],
  4. level=0),
  5. ClassDef(name='SleepyClass',
  6. bases=[],
  7. body=[FunctionDef(name='__init__',
  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=[Str(s='Sleeping in __init__')],
  15. nl=True),
  16. Print(dest=None,
  17. values=[BinOp(left=Str(s='Sleep returned '),
  18. op=Add(),
  19. right=Call(func=Name(id='str',
  20. ctx=Load()),
  21. args=[Call(func=Name(id='sleep',
  22. ctx=Load()),
  23. args=[Num(n=0.01)],
  24. keywords=[],
  25. starargs=None,
  26. kwargs=None)],
  27. keywords=[],
  28. starargs=None,
  29. kwargs=None))],
  30. nl=True)],
  31. decorator_list=[]),
  32. FunctionDef(name='doSleep',
  33. args=arguments(args=[Name(id='self',
  34. ctx=Param()),
  35. Name(id='param',
  36. ctx=Param())],
  37. vararg=None,
  38. kwarg=None,
  39. defaults=[]),
  40. body=[Assign(targets=[Name(id='x',
  41. ctx=Store())],
  42. value=Num(n=42)),
  43. Print(dest=None,
  44. values=[Str(s='Sleeping for .01 seconds')],
  45. nl=True),
  46. Print(dest=None,
  47. values=[BinOp(left=Str(s='Sleep returned '),
  48. op=Add(),
  49. right=Call(func=Name(id='str',
  50. ctx=Load()),
  51. args=[Call(func=Name(id='sleep',
  52. ctx=Load()),
  53. args=[Num(n=0.01)],
  54. keywords=[],
  55. starargs=None,
  56. kwargs=None)],
  57. keywords=[],
  58. starargs=None,
  59. kwargs=None))],
  60. nl=True),
  61. Print(dest=None,
  62. values=[BinOp(left=Str(s='Woke up; x = '),
  63. op=Add(),
  64. right=Call(func=Name(id='str',
  65. ctx=Load()),
  66. args=[Name(id='x',
  67. ctx=Load())],
  68. keywords=[],
  69. starargs=None,
  70. kwargs=None))],
  71. nl=True),
  72. Print(dest=None,
  73. values=[BinOp(left=Str(s='param = '),
  74. op=Add(),
  75. right=Call(func=Name(id='str',
  76. ctx=Load()),
  77. args=[Name(id='param',
  78. ctx=Load())],
  79. keywords=[],
  80. starargs=None,
  81. kwargs=None))],
  82. nl=True)],
  83. decorator_list=[])],
  84. decorator_list=[]),
  85. Assign(targets=[Name(id='sleeper',
  86. ctx=Store())],
  87. value=Call(func=Name(id='SleepyClass',
  88. ctx=Load()),
  89. args=[],
  90. keywords=[],
  91. starargs=None,
  92. kwargs=None)),
  93. Expr(value=Call(func=Attribute(value=Name(id='sleeper',
  94. ctx=Load()),
  95. attr='doSleep',
  96. ctx=Load()),
  97. args=[Num(n=7)],
  98. keywords=[],
  99. starargs=None,
  100. kwargs=None))])