t22.trans 1.7 KB

123456789101112131415161718192021222324252627282930313233
  1. Module(body=[Assign(targets=[Name(id='x',
  2. ctx=Store())],
  3. value=Num(n=1)),
  4. Assign(targets=[Name(id='n',
  5. ctx=Store())],
  6. value=Num(n=0)),
  7. While(test=Compare(left=Name(id='x',
  8. ctx=Load()),
  9. ops=[Lt()],
  10. comparators=[Num(n=10)]),
  11. body=[Assign(targets=[Name(id='x',
  12. ctx=Store())],
  13. value=BinOp(left=Name(id='x',
  14. ctx=Load()),
  15. op=Add(),
  16. right=Num(n=1))),
  17. If(test=Compare(left=Name(id='n',
  18. ctx=Load()),
  19. ops=[Eq()],
  20. comparators=[Num(n=2)]),
  21. body=[Continue()],
  22. orelse=[]),
  23. Assign(targets=[Name(id='n',
  24. ctx=Store())],
  25. value=BinOp(left=Name(id='n',
  26. ctx=Load()),
  27. op=Add(),
  28. right=Num(n=1)))],
  29. orelse=[]),
  30. Print(dest=None,
  31. values=[Name(id='n',
  32. ctx=Load())],
  33. nl=True)])