[Python-ideas] PEP: Extended stat_result (First Draft)

Pieter Nagel pieter at nagel.co.za
Tue May 7 13:55:32 CEST 2013


On Tue, 2013-05-07 at 07:44 -0400, Random832 wrote:
> On 05/07/2013 02:51 AM, Pieter Nagel wrote:
> > At issue here is the file type stat flags such as S_IS*.
> >
> > The permission bits are not a problem. I'm confident that the permission
> > bits are specified by POSIX, and thus cross-platform (haven't
> > double-checked though).
> They are not. What is specified, which you may be thinking of, is the 
> meaning of a numeric argument to the chmod _command_, from which you can 
> no more infer that the bits themselves are the same than you can for 
> signal numbers vs. the seven numeric values specified as arguments to 
> the kill command.

Ah, I was not aware of that.

However, the permission bits are not as open-ended for extension as the
stat S_I* flags are. So if there aren't any clashes by now, there might
never be.

Whereas in the bug-report thread I linked, it was pointed out that
platforms already exist with different meanings assigned to the same
bits of the stat flags, so the issue is more pressing there.

-- 
Pieter Nagel





More information about the Python-ideas mailing list