Why gives k = 09 a syntax error ?

2008-10-29 Thread Stef Mientki
hello, Why gives k = 09 a syntax error ? thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: Why gives k = 09 a syntax error ?

2008-10-29 Thread Guilherme Polo
On 10/29/08, Stef Mientki [EMAIL PROTECTED] wrote: hello, Why gives k = 09 a syntax error ? 09 is not a valid octal number. Instead use 011. Ok, I guess you were not aware that prefixing a number with a '0' would cause python to parse it as an octal and now you know. thanks, Stef

Re: Why gives k = 09 a syntax error ?

2008-10-29 Thread Stef Mientki
Guilherme Polo wrote: On 10/29/08, Stef Mientki [EMAIL PROTECTED] wrote: hello, Why gives k = 09 a syntax error ? 09 is not a valid octal number. Instead use 011. Ok, I guess you were not aware that prefixing a number with a '0' would cause python to parse it as an octal and now

Re: Why gives k = 09 a syntax error ?

2008-10-29 Thread Mensanator
On Oct 29, 2:44 pm, Stef Mientki [EMAIL PROTECTED] wrote: Guilherme Polo wrote: On 10/29/08, Stef Mientki [EMAIL PROTECTED] wrote: hello,  Why gives k = 09  a syntax error ? 09 is not a valid octal number. Instead use 011. Ok, I guess you were not aware that prefixing a number

Re: Why gives k = 09 a syntax error ?

2008-10-29 Thread Diez B. Roggisch
Stef Mientki schrieb: hello, Why gives k = 09 a syntax error ? because numbers starting with 0 are an octal value, allowing only the literals 0-7. Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Why gives k = 09 a syntax error ?

2008-10-29 Thread Andrii V. Mishkovskyi
2008/10/29 Stef Mientki [EMAIL PROTECTED]: hello, Why gives k = 09 a syntax error ? Because leading zero means that the number is octal, and there is no 9 among octal digits. :) thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list -- Wbr, Andrii Mishkovskyi

Re: Why gives k = 09 a syntax error ?

2008-10-29 Thread Terry Reedy
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 -- http://mail.python.org/mailman/listinfo/python-list

Re: Why gives k = 09 a syntax error ?

2008-10-29 Thread Mensanator
On Oct 29, 4:25 pm, Terry Reedy [EMAIL PROTECTED] 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

Re: Why gives k = 09 a syntax error ?

2008-10-29 Thread Robert Kern
Mensanator wrote: On Oct 29, 4:25 pm, Terry Reedy [EMAIL PROTECTED] 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

Re: Why gives k = 09 a syntax error ?

2008-10-29 Thread Cameron Laird
In article [EMAIL PROTECTED], Mensanator [EMAIL PROTECTED] wrote: On Oct 29, 2:44 pm, Stef Mientki [EMAIL PROTECTED] wrote: Guilherme Polo wrote: On 10/29/08, Stef Mientki [EMAIL PROTECTED] wrote: hello,  Why gives k = 09  a syntax error ? 09 is not a valid octal number. Instead use

Re: Why gives k = 09 a syntax error ?

2008-10-29 Thread Terry Reedy
Mensanator wrote: On Oct 29, 4:25 pm, Terry Reedy [EMAIL PROTECTED] 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. except

Re: Why gives k = 09 a syntax error ?

2008-10-29 Thread Mensanator
On Oct 29, 4:17�pm, [EMAIL PROTECTED] (Cameron Laird) wrote: In article [EMAIL PROTECTED], Mensanator �[EMAIL PROTECTED] wrote: On Oct 29, 2:44�pm, Stef Mientki [EMAIL PROTECTED] wrote: Guilherme Polo wrote: On 10/29/08, Stef Mientki [EMAIL PROTECTED] wrote: hello, �Why gives k

Re: Why gives k = 09 a syntax error ?

2008-10-29 Thread Steve Holden
Cameron Laird wrote: In article [EMAIL PROTECTED], Mensanator [EMAIL PROTECTED] wrote: On Oct 29, 2:44 pm, Stef Mientki [EMAIL PROTECTED] wrote: Guilherme Polo wrote: On 10/29/08, Stef Mientki [EMAIL PROTECTED] wrote: hello, Why gives k = 09 a syntax error ? 09 is not a valid octal

Re: Why gives k = 09 a syntax error ?

2008-10-29 Thread Terry Reedy
Mensanator wrote: On Oct 29, 4:17�pm, [EMAIL PROTECTED] (Cameron Laird) wrote: I contest that; my observation is that it's entirely an artifact of legacy software, Really? Don't they still use octal for this stuff? $ ls -l total 1717 -r-xr-x---+ 1 mensanator Users 57 Mar 29 2008