New submission from Luke Deller <lukedell...@gmail.com>:
Microsoft Windows supports some extra file open modes including: "S" Specifies that caching is optimized for, but not restricted to, sequential access from disk. "T" Specifies a file as temporary. If possible, it is not flushed to disk. "D" Specifies a file as temporary. It is deleted when the last file pointer is closed Python 2 used to allow "T" and "D" flags in the built-in `open` function (though this was not documented): https://github.com/python/cpython/blob/2.7/Objects/fileobject.c#L214 It would be great if these flags were allowed in Python 3. I see that Python3 implementation uses `open`/`_wopen` rather than `fopen` now. The mapping to numeric flags for `_wopen` is shown in the documentation here: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fopen-wfopen (search for "Equivalent oflag value") ---------- components: IO messages: 397971 nosy: lukedeller1 priority: normal severity: normal status: open title: Support Windows file open modes for `open` built-in function type: enhancement versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44705> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com