Why gives "k = 09" a syntax error ?

Terry Reedy tjreedy at udel.edu
Thu Oct 30 01:19:20 EDT 2008


Mensanator wrote:
> On Oct 29, 4:17�pm, cla... at lairds.us (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 Cygwin.bat
> -r-xr-x---+  1 mensanator Users   7022 Mar 29  2008 Cygwin.ico
> d---------+  5 mensanator None       0 Apr 21  2008 Seed7
> -rwxr-xr-x   1 mensanator None   15870 Apr 11  2008 a.exe
>     |
> This would be 0755, wouldn't it? You certainly wouldn't want
> to try to figure out the decimal equivalent.

There was a suggestion to dump octal literals.  The above is why they 
were not.




More information about the Python-list mailing list