t336.trans 1.9 KB

1234567891011121314151617181920212223242526272829303132
  1. Module(body=[FunctionDef(name='test',
  2. args=arguments(args=[Name(id='i',
  3. ctx=Param())],
  4. vararg=None,
  5. kwarg=None,
  6. defaults=[]),
  7. body=[Assign(targets=[Name(id='f',
  8. ctx=Store())],
  9. value=Num(n=3)),
  10. TryExcept(body=[Return(value=Compare(left=Name(id='f',
  11. ctx=Load()),
  12. ops=[Eq()],
  13. comparators=[Num(n=5)]))],
  14. handlers=[ExceptHandler(type=Name(id='ValueError',
  15. ctx=Load()),
  16. name=None,
  17. body=[Return(value=Name(id='True',
  18. ctx=Load()))])],
  19. orelse=[])],
  20. decorator_list=[]),
  21. If(test=Call(func=Name(id='test',
  22. ctx=Load()),
  23. args=[Num(n=12)],
  24. keywords=[],
  25. starargs=None,
  26. kwargs=None),
  27. body=[Print(dest=None,
  28. values=[Str(s='Is true')],
  29. nl=True)],
  30. orelse=[Print(dest=None,
  31. values=[Str(s='Is false')],
  32. nl=True)])])