Why gives "k = 09" a syntax error ?

Robert Kern robert.kern at gmail.com
Wed Oct 29 22:57:53 CET 2008

Mensanator wrote:
> On Oct 29, 4:25 pm, Terry Reedy <tjre... at udel.edu> wrote:
>> Stef Mientki wrote:
>>> hello,
>>> Why gives "k = 09"  a syntax error ?
>> You have gotten the 2.x answer.  In 3.0, 0b,0o,0x prefixes are valid and
>> required for binary, octal, and hexadecimal literals.  0digits is invalid.
>> tjr
> Is it documented? :-)



Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

More information about the Python-list mailing list