Charles-François Natali <neolo...@free.fr> added the comment: > 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12760> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com