Re: Why gives "k = 09" a syntax error ?



Cameron Laird wrote:
In article <6772c5db-cdcc-4f79-9a24-1da8e849c870@xxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Mensanator <mensanator@xxxxxxx> wrote:
On Oct 29, 2:44 pm, Stef Mientki <stef.mien...@xxxxxxxxx> wrote:
Guilherme Polo wrote:
On 10/29/08, Stef Mientki <stef.mien...@xxxxxxxxx> 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 guys,
I didn't realize there were still people using octal notation ;-)
Windows users don't have much need for it, but it's still
popular with the 'Nix crowd.
.
.
.
I contest that; my observation is that it's entirely an artifact
of legacy software, and regarded as no better than a distraction
by even the most narrow human 'Nixers, or the hardware types who
might at one time have found octal natural. My own origins were
in hardware, Unix, and other DEC OSs, so I consider myself as
likely as anyone to think in octal--and I rarely do.

While I can't accept the "popular" part, I agree with you that
Unix people are at least more likely to recognize the 0-prefix.

They are also more likely to write

chmod 330 file

than

chmod ug=rw file

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

.



Relevant Pages

  • Re: Error while trying to upgrade to a Windows 2003 R2 domain
    ... Think about to talk to MS support, especially with the UNIX part, maybe it is known. ... Best regards ... we've got Windows Services for Unix v3.0. ... Out of desperation, we even tried to install SFU v3.5, but that didn't ...
    (microsoft.public.win2000.active_directory)
  • Re: [opensuse] Installation methods
    ... >> Regards, Rajko. ... I downloaded a script yesterday. ... So I should have ran "chmod 777 ... I also ran the chmod command for yet another program I was attempting to ...
    (SuSE)
  • Re: Why gives "k = 09" a syntax error ?
    ... I didn't realize there were still people using octal notation;-) ... popular with the 'Nix crowd. ... by even the most narrow human 'Nixers, or the hardware types who ... Unix people are at least more likely to recognize the 0-prefix. ...
    (comp.lang.python)
  • Re: Why doesnt Perl have cp or mv?
    ... Perl doesn't actually emulate the Unix *commands* chmod and chown, ... The Unix chmod and chown commands are essentially wrappers around the ...
    (comp.lang.perl.misc)
  • Re: File Size Question
    ... Do you know if the consumer platform matters in regards to file size? ... example, does Linux, Unix, or OSX return the same file size for a binary file ...
    (microsoft.public.dotnet.languages.csharp)