[docs] [issue12760] Add create mode to open()

Antoine Pitrou report at bugs.python.org
Thu Aug 18 16:19:17 CEST 2011

Antoine Pitrou <pitrou at free.fr> added the comment:

> 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().

Yeah, but I think "exclusively" is quite misleading since it does not
perform any locking of any kind. Also, I don't think we'll ever
integrate the glibc's "c" option in io.open().


Python tracker <report at bugs.python.org>

More information about the docs mailing list