[Python-3000] Questions about the Octal literal PEP

Raymond Hettinger raymond at ewtllc.com
Mon Mar 19 18:09:38 CET 2007


In Py2.6 and Py3.0, what would these emit:

      map(int, '08:30:00'.split(':'))     # handle common decimal string
formats with leading zeroes

      int('0777', 8)                                 # handle externally
created octal literal strings

      myfile.write(oct(44))                 # writing to a file format
that requires 054 style output

      eval(oct(44)) == 44                  #  basic invariant for oct(()

If any of those change from Py2.5, it will result in
gratuitous code breakage for almost zero benefit.



Raymond



More information about the Python-3000 mailing list