t463.trans 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. Module(body=[Import(names=[alias(name='math',
  2. asname=None)]),
  3. ClassDef(name='F',
  4. bases=[],
  5. body=[FunctionDef(name='__init__',
  6. args=arguments(args=[Name(id='self',
  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='a',
  14. ctx=Store())],
  15. value=Num(n=1)),
  16. Assign(targets=[Attribute(value=Name(id='self',
  17. ctx=Load()),
  18. attr='b',
  19. ctx=Store())],
  20. value=Num(n=2)),
  21. Assign(targets=[Attribute(value=Name(id='self',
  22. ctx=Load()),
  23. attr='d',
  24. ctx=Store())],
  25. value=Num(n=4))],
  26. decorator_list=[])],
  27. decorator_list=[]),
  28. Assign(targets=[Name(id='f',
  29. ctx=Store())],
  30. value=Call(func=Name(id='F',
  31. ctx=Load()),
  32. args=[],
  33. keywords=[],
  34. starargs=None,
  35. kwargs=None)),
  36. Print(dest=None,
  37. values=[Call(func=Name(id='hasattr',
  38. ctx=Load()),
  39. args=[Name(id='f',
  40. ctx=Load()),
  41. Str(s='a')],
  42. keywords=[],
  43. starargs=None,
  44. kwargs=None)],
  45. nl=True),
  46. Print(dest=None,
  47. values=[Call(func=Name(id='hasattr',
  48. ctx=Load()),
  49. args=[Name(id='f',
  50. ctx=Load()),
  51. Str(s='c')],
  52. keywords=[],
  53. starargs=None,
  54. kwargs=None)],
  55. nl=True),
  56. Print(dest=None,
  57. values=[Call(func=Name(id='hasattr',
  58. ctx=Load()),
  59. args=[Name(id='f',
  60. ctx=Load()),
  61. Str(s='D')],
  62. keywords=[],
  63. starargs=None,
  64. kwargs=None)],
  65. nl=True),
  66. TryExcept(body=[Print(dest=None,
  67. values=[Call(func=Name(id='hasattr',
  68. ctx=Load()),
  69. args=[Name(id='f',
  70. ctx=Load()),
  71. Name(id='b',
  72. ctx=Load())],
  73. keywords=[],
  74. starargs=None,
  75. kwargs=None)],
  76. nl=True),
  77. Print(dest=None,
  78. values=[Str(s="You shouldn't see this.")],
  79. nl=True)],
  80. handlers=[ExceptHandler(type=None,
  81. name=None,
  82. body=[Print(dest=None,
  83. values=[Call(func=Name(id='hasattr',
  84. ctx=Load()),
  85. args=[Name(id='f',
  86. ctx=Load()),
  87. Str(s='b')],
  88. keywords=[],
  89. starargs=None,
  90. kwargs=None)],
  91. nl=True)])],
  92. orelse=[]),
  93. Print(dest=None,
  94. values=[],
  95. nl=True),
  96. Print(dest=None,
  97. values=[Call(func=Name(id='hasattr',
  98. ctx=Load()),
  99. args=[Name(id='str',
  100. ctx=Load()),
  101. Str(s='center')],
  102. keywords=[],
  103. starargs=None,
  104. kwargs=None)],
  105. nl=True),
  106. Print(dest=None,
  107. values=[Call(func=Name(id='hasattr',
  108. ctx=Load()),
  109. args=[Name(id='str',
  110. ctx=Load()),
  111. Str(s='ljust')],
  112. keywords=[],
  113. starargs=None,
  114. kwargs=None)],
  115. nl=True),
  116. Print(dest=None,
  117. values=[],
  118. nl=True),
  119. Print(dest=None,
  120. values=[Call(func=Name(id='hasattr',
  121. ctx=Load()),
  122. args=[Name(id='math',
  123. ctx=Load()),
  124. Str(s='pi')],
  125. keywords=[],
  126. starargs=None,
  127. kwargs=None)],
  128. nl=True),
  129. Print(dest=None,
  130. values=[Call(func=Name(id='hasattr',
  131. ctx=Load()),
  132. args=[Name(id='math',
  133. ctx=Load()),
  134. Str(s='tau')],
  135. keywords=[],
  136. starargs=None,
  137. kwargs=None)],
  138. nl=True),
  139. TryExcept(body=[Print(dest=None,
  140. values=[Call(func=Name(id='hasattr',
  141. ctx=Load()),
  142. args=[Name(id='math',
  143. ctx=Load()),
  144. Name(id='None',
  145. ctx=Load())],
  146. keywords=[],
  147. starargs=None,
  148. kwargs=None)],
  149. nl=True),
  150. Print(dest=None,
  151. values=[Str(s="You shouldn't see this.")],
  152. nl=True)],
  153. handlers=[ExceptHandler(type=None,
  154. name=None,
  155. body=[Print(dest=None,
  156. values=[Call(func=Name(id='hasattr',
  157. ctx=Load()),
  158. args=[Name(id='F',
  159. ctx=Load()),
  160. Str(s='a')],
  161. keywords=[],
  162. starargs=None,
  163. kwargs=None)],
  164. nl=True)])],
  165. orelse=[])])