PEP 466: another counter-argument for open(blocking=True)

This commit is contained in:
Victor Stinner 2013-07-17 13:15:18 +02:00
parent 0c8a96692c
commit f6bac4e607
1 changed files with 6 additions and 0 deletions

View File

@ -199,6 +199,12 @@ operating system. If a platform does not support a function, the
function should not be available on the platform. For example,
the ``os.fork()`` function is not available on Windows.
UNIX has more flag on file descriptors: ``O_DSYNC``, ``O_SYNC``,
``O_DIRECT``, etc. Adding all these flags complicates the signature and
the implementation of functions creating file descriptor like open().
Moreover, these flags do not work on any file type, and are not
portable.
For all these reasons, this alternative was rejected. The PEP 3156
proposes an abstraction for asynchronous I/O supporting non-blocking
files on Windows.