This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients David.Townshend, benjamin.peterson, docs@python, neologix, pitrou, vstinner
Date 2011-08-18.13:24:52
SpamBayes Score 1.1640196e-07
Marked as misclassified No
Message-id <>
In-reply-to <>
> 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
              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:53neologixsetrecipients: + neologix, pitrou, vstinner, benjamin.peterson, docs@python, David.Townshend
2011-08-18 13:24:52neologixlinkissue12760 messages
2011-08-18 13:24:52neologixcreate