t169.py 990 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. big = 012345670123456701234567012345670L # 32 octal digits
  2. print "'%o'" % big
  3. print "'%o'" % -big
  4. print "'%5o'" % -big
  5. print "'%33o'" % -big
  6. print "'%34o'" % -big
  7. print "'%-34o'" % -big
  8. print "'%034o'" % -big
  9. print "'%-034o'" % -big
  10. print "'%036o'" % -big
  11. print "'%036o'" % big
  12. print "'%0+36o'" % big
  13. print "'%+36o'" % big
  14. print "'%36o'" % big
  15. print "'%.2o'" % big
  16. print "'%.32o'" % big
  17. print "'%.33o'" % big
  18. print "'%34.33o'" % big
  19. print "'%-34.33o'" % big
  20. print "'%o'" % big
  21. print "'%#o'" % big
  22. print "'%#o'" % -big
  23. print "'%#.34o'" % -big
  24. print "'%#+.34o'" % big
  25. print "'%# .34o'" % big
  26. print "'%#+.34o'" % big
  27. print "'%#-+.34o'" % big
  28. print "'%#-+37.34o'" % big
  29. print "'%#+37.34o'" % big
  30. # next one gets one leading zero from precision
  31. print "'%.33o'" % big
  32. # base marker shouldn't change that
  33. print "'%#.33o'" % big
  34. # but reduce precision
  35. print "'%#.32o'" % big
  36. # one leading zero from precision
  37. print "'%034.33o'" % big
  38. # base marker shouldn't change that
  39. print "'%0#34.33o'" % big