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 <CAH_1eM3tWTZeWEMPQQqh8X7ykezhjOw-_dU5UgPgdtVMwX3ZKg@mail.gmail.com>
In-reply-to <1313667236.12.0.608700658903.issue12760@psf.upfronthosting.co.za>
Content
> 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.
History
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