mode for file created by open

Terry Reedy tjreedy at udel.edu
Sat Jun 9 19:03:07 EDT 2012


On 6/9/2012 6:25 PM, Neal Becker wrote:
> Terry Reedy wrote:
>
>> The original open builtin was a thin wrapper around old C's stdio.open.
>> Open no longer has that constraint. After more discussion here, someone
>> could open a tracker issue with a specific proposal. Keep in mind that
>> 'mode' is already a parameter name for the mode of opening, as opposed
>> to the permission mode for subsequent users.
>>
>
> I haven't seen the current code - I'd guess it just uses posix open.

open is io.open. io.py mostly just imports _io (from .c). That will do 
whatever is appropriate for the platform.
>
> So I would guess it wouldn't be difficult to add the creation mode argument.

On posix system, probably not. On windows, just ignore it, unless 'root' 
can be mapped to 'admin'.
>
> How about call it cr_mode?

Probably too cryptic. creation_mode possible.

-- 
Terry Jan Reedy




More information about the Python-list mailing list