Leading 0's syntax error in datetime.date module (Python 3.6)

Skip Montanaro skip.montanaro at gmail.com
Thu May 10 16:13:24 EDT 2018


> Bear in mind that Unix file modes are traditionally written in octal,
> because they have no meaning as numbers. They're more like
> enumerations, or bitfields.

The current chmod(2) man page says that the type of the second is mode_t,
but back in the early days, it appears it was just declared to be int.
Here's 2.11BSD dated 1986:

https://www.freebsd.org/cgi/man.cgi?query=chmod&sektion=2&apropos=0&manpath=2.11+BSD

By 1991, 4.3BSD declared the second arg to be mode_t:

https://www.freebsd.org/cgi/man.cgi?query=chmod&sektion=2&apropos=0&manpath=4.3BSD+NET%2f2

(I find it odd that the above service doesn't include 4.2BSD man pages, but
I digress.)

Octal notation matched up better with the sizes of the individual groups.
Hex and base 10 are worthless for this, as their boundaries don't line up
with the number of bits used in each group. Binary consumes too much space
and no "chunkiness." Octal was "just right."

Skip



More information about the Python-list mailing list