t523.trans 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. Module(body=[ClassDef(name='A',
  2. bases=[],
  3. body=[FunctionDef(name='__nonzero__',
  4. args=arguments(args=[Name(id='self',
  5. ctx=Param())],
  6. vararg=None,
  7. kwarg=None,
  8. defaults=[]),
  9. body=[Return(value=Str(s='not the right value'))],
  10. decorator_list=[])],
  11. decorator_list=[]),
  12. TryExcept(body=[Print(dest=None,
  13. values=[Call(func=Name(id='bool',
  14. ctx=Load()),
  15. args=[Call(func=Name(id='A',
  16. ctx=Load()),
  17. args=[],
  18. keywords=[],
  19. starargs=None,
  20. kwargs=None)],
  21. keywords=[],
  22. starargs=None,
  23. kwargs=None)],
  24. nl=True)],
  25. handlers=[ExceptHandler(type=Name(id='TypeError',
  26. ctx=Load()),
  27. name=Name(id='e',
  28. ctx=Store()),
  29. body=[Print(dest=None,
  30. values=[Name(id='e',
  31. ctx=Load())],
  32. nl=True)])],
  33. orelse=[]),
  34. ClassDef(name='B',
  35. bases=[],
  36. body=[FunctionDef(name='__len__',
  37. args=arguments(args=[Name(id='self',
  38. ctx=Param())],
  39. vararg=None,
  40. kwarg=None,
  41. defaults=[]),
  42. body=[Return(value=Str(s='not the right value'))],
  43. decorator_list=[])],
  44. decorator_list=[]),
  45. TryExcept(body=[Print(dest=None,
  46. values=[Call(func=Name(id='bool',
  47. ctx=Load()),
  48. args=[Call(func=Name(id='B',
  49. ctx=Load()),
  50. args=[],
  51. keywords=[],
  52. starargs=None,
  53. kwargs=None)],
  54. keywords=[],
  55. starargs=None,
  56. kwargs=None)],
  57. nl=True)],
  58. handlers=[ExceptHandler(type=Name(id='TypeError',
  59. ctx=Load()),
  60. name=Name(id='e',
  61. ctx=Store()),
  62. body=[Print(dest=None,
  63. values=[Name(id='e',
  64. ctx=Load())],
  65. nl=True)])],
  66. orelse=[])])