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

Chris Angelico rosuav at gmail.com
Sat May 12 05:19:24 EDT 2018


On Sat, May 12, 2018 at 6:44 PM, Gregory Ewing
<greg.ewing at canterbury.ac.nz> wrote:
> Chris Angelico wrote:
>>
>> Tack setuid onto "owner", setgid onto "group", and sticky
>> onto "others"? Pretty arbitrary, and disrupts the fundamental meaning
>> of each set.
>
>
> Yes, it would be totally silly if e.g. the "ls" command were
> to regroup them that way when displaying the permission bits...
> oh, wait...
>
> % echo > blarg.txt
> % chmod 7777 blarg.txt
> % ls -l blarg.txt
> -rwsrwsrwt  1 greg  staff  1 12 May 20:40 blarg.txt

That's a hack to fit it into a fixed *display* width. And there are
quite a few weirdnesses to make that work. Not something I would
recommend except when, as here, backward compat is critical.

ChrisA



More information about the Python-list mailing list