t195.trans 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. Module(body=[FunctionDef(name='foo',
  2. args=arguments(args=[Name(id='value',
  3. ctx=Param())],
  4. vararg=None,
  5. kwarg=None,
  6. defaults=[Name(id='None',
  7. ctx=Load())]),
  8. body=[For(target=Name(id='i',
  9. ctx=Store()),
  10. iter=List(elts=[Num(n=-1),
  11. Num(n=0),
  12. Num(n=1),
  13. Num(n=2),
  14. Num(n=3),
  15. Num(n=4)],
  16. ctx=Load()),
  17. body=[If(test=Compare(left=Name(id='i',
  18. ctx=Load()),
  19. ops=[Lt()],
  20. comparators=[Num(n=0)]),
  21. body=[Continue()],
  22. orelse=[If(test=Compare(left=Name(id='i',
  23. ctx=Load()),
  24. ops=[Eq()],
  25. comparators=[Num(n=0)]),
  26. body=[Expr(value=Yield(value=Num(n=0)))],
  27. orelse=[If(test=Compare(left=Name(id='i',
  28. ctx=Load()),
  29. ops=[Eq()],
  30. comparators=[Num(n=1)]),
  31. body=[Expr(value=Yield(value=Num(n=1))),
  32. Expr(value=Yield(value=Name(id='value',
  33. ctx=Load()))),
  34. Expr(value=Yield(value=Num(n=2)))],
  35. orelse=[Expr(value=Yield(value=Name(id='i',
  36. ctx=Load())))])])])],
  37. orelse=[])],
  38. decorator_list=[]),
  39. Print(dest=None,
  40. values=[Call(func=Name(id='list',
  41. ctx=Load()),
  42. args=[Call(func=Name(id='foo',
  43. ctx=Load()),
  44. args=[],
  45. keywords=[],
  46. starargs=None,
  47. kwargs=None)],
  48. keywords=[],
  49. starargs=None,
  50. kwargs=None)],
  51. nl=True)])