t168.py 861 B

123456789101112131415161718192021222324252627282930313233343536
  1. big = 0x1234567890abcdef12345L # 21 hex digits
  2. print "'%x'" % big
  3. print "'%x'" % -big
  4. print "'%5x'" % -big
  5. print "'%22x'" % -big
  6. print "'%23x'" % -big
  7. print "'%-23x'" % -big
  8. print "'%023x'" % -big
  9. print "'%-023x'" % -big
  10. print "'%025x'" % -big
  11. print "'%025x'" % big
  12. print "'%0+25x'" % big
  13. print "'%+25x'" % big
  14. print "'%25x'" % big
  15. print "'%.2x'" % big
  16. print "'%.21x'" % big
  17. print "'%.22x'" % big
  18. print "'%23.22x'" % big
  19. print "'%-23.22x'" % big
  20. print "'%X'" % big
  21. print "'%#X'" % big
  22. print "'%#x'" % big
  23. print "'%#x'" % -big
  24. print "'%#.23x'" % -big
  25. print "'%#+.23x'" % big
  26. print "'%# .23x'" % big
  27. print "'%#+.23X'" % big
  28. print "'%#-+.23X'" % big
  29. print "'%#-+26.23X'" % big
  30. print "'%#-+27.23X'" % big
  31. print "'%#+27.23X'" % big
  32. # next one gets two leading zeroes from precision
  33. # 0 flag and the width
  34. print "'%#+027.23X'" % big
  35. # same
  36. print "'%#+27.23X'" % big