t433.trans 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. Module(body=[Print(dest=None,
  2. values=[BinOp(left=Str(s='formatting with just %d argument'),
  3. op=Mod(),
  4. right=Num(n=1))],
  5. nl=True),
  6. Print(dest=None,
  7. values=[BinOp(left=Str(s='%d %i %o %x %X %e %E %f %F'),
  8. op=Mod(),
  9. right=Tuple(elts=[Num(n=12),
  10. Num(n=-12),
  11. Num(n=-7),
  12. Num(n=74),
  13. Num(n=-74),
  14. Num(n=23000000000.0),
  15. Num(n=2.3e-10),
  16. Num(n=1.23),
  17. Num(n=-1.23)],
  18. ctx=Load()))],
  19. nl=True),
  20. Print(dest=None,
  21. values=[BinOp(left=Str(s='%g %G %g %G'),
  22. op=Mod(),
  23. right=Tuple(elts=[Num(n=1.23e-06),
  24. Num(n=1.23e-06),
  25. Num(n=1.4),
  26. Num(n=-1.4)],
  27. ctx=Load()))],
  28. nl=True),
  29. Print(dest=None,
  30. values=[BinOp(left=Str(s='%r is a repr and %s is a string'),
  31. op=Mod(),
  32. right=Tuple(elts=[Str(s='this'),
  33. Str(s='this')],
  34. ctx=Load()))],
  35. nl=True),
  36. Print(dest=None,
  37. values=[BinOp(left=Str(s='I can also use a %(structure)s to format.'),
  38. op=Mod(),
  39. right=Dict(keys=[Str(s='structure')],
  40. values=[Str(s='dictionary')]))],
  41. nl=True)])