Why gives "k = 09" a syntax error ?

Terry Reedy tjreedy at udel.edu
Wed Oct 29 17:25:52 EDT 2008


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




More information about the Python-list mailing list