mode for file created by open
Terry Reedy
tjreedy at udel.edu
Sat Jun 9 14:31:07 EDT 2012
On 6/9/2012 10:08 AM, Devin Jeanpierre wrote:
> On Sat, Jun 9, 2012 at 7:42 AM, Neal Becker<ndbecker2 at gmail.com> wrote:
>> Doesn't anyone else think it would be a good addition to open to specify a file
>> creation mode? Like posix open? Avoid all these nasty workarounds?
>
> I do, although I'm hesitant, because this only applies when mode ==
> 'w', and open has a large and growing list of parameters.
The buffer parameter (I believe it is) also does not always apply.
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.
--
Terry Jan Reedy
More information about the Python-list
mailing list