Annoying octal notation

Derek Martin code at
Sun Aug 23 05:32:03 CEST 2009

On Fri, Aug 21, 2009 at 04:23:57PM -0700, James Harris wrote:
> You misunderstand. I was saying that taking a leading zero as
> indicating octal is archaic. Octal itself is fine where appropriate.

I don't see that the leading zero is any more archaic than the use of
octal itself...  Both originate from around the same time period, and
are used in the same cases.  We should just prohibit octal entirely

But I suppose it depends on which definition of "archaic" you use.  In
the other common sense of the word, the leading zero is no more
archaic than the C programming language.  Let's ban the use of all
three. :)  (I believe C is still the language in which the largest
number of lines of new code are written, but if not, it's way up
> The chmod command doesn't require a leading zero.

No, but it doesn't need any indicator that the number given to it is
in octal; in the case of the command line tool, octal is *required*,
and the argument is *text*.  However, the chmod() system call, and the
interfaces to it in every language I'm familiar with that has one, do
require the leading zero (because that's how you represent octal).
Including Python, for some 20 years or so.

Derek D. Martin
GPG Key ID: 0x81CFE75D

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list