Message142314
> The "#ifdef O_EXCL" in the source code is probably very old. Copying a message I posted on python-ideas:
>
> O_EXCL is a POSIX standard. It is also supported
> under Windows by the _open/_wopen compatibility functions (which we use
> for file I/O).
>
If it's supported by Windows then I'm OK (not that I personaly care
about Windows :-).
> and is not as easy to read as "open(file, 'c')"
Well, I'd rather have this flag called 'x', to be consistent with
glibc's fopen():
"""
c (since glibc 2.3.3)
Do not make the open operation, or subsequent read and write
operations, thread cancellation points.
x Open the file exclusively (like the O_EXCL flag of
open(2)). If the
file already exists, fopen() fails, and sets errno to
EEXIST. This
flag is ignored for fdopen().
"""
By the way, could you submit your patch as a mercurial diff ("hg diff")?
It makes it easier to review under Rietveld. |
|
Date |
User |
Action |
Args |
2011-08-18 13:24:53 | neologix | set | recipients:
+ neologix, pitrou, vstinner, benjamin.peterson, docs@python, David.Townshend |
2011-08-18 13:24:52 | neologix | link | issue12760 messages |
2011-08-18 13:24:52 | neologix | create | |
|