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 lukedeller1
Recipients lukedeller1
Date 2021-07-22.00:15:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1626912918.78.0.0995473135794.issue44705@roundup.psfhosted.org>
In-reply-to
Content
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")
History
Date User Action Args
2021-07-22 00:15:18lukedeller1setrecipients: + lukedeller1
2021-07-22 00:15:18lukedeller1setmessageid: <1626912918.78.0.0995473135794.issue44705@roundup.psfhosted.org>
2021-07-22 00:15:18lukedeller1linkissue44705 messages
2021-07-22 00:15:18lukedeller1create