Skip to content

Commit d58bcc1

Browse files
picnic-svensirosen
authored andcommitted
Update tempfile.rst
1 parent 5afbb60 commit d58bcc1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Doc/library/tempfile.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,9 @@ The module defines the following user-callable items:
256256

257257
The file descriptor is :ref:`not inherited by child processes <fd_inheritance>`.
258258

259-
Unlike :func:`TemporaryFile`, the user of :func:`mkstemp` is responsible
260-
for deleting the temporary file when done with it.
259+
Unlike :func:`TemporaryFile`, the user of :func:`mkstemp` is responsible for closing
260+
and deleting the temporary file (by e.g. using :func:`os.close` and
261+
:func:`os.remove`) when done with it.
261262

262263
If *suffix* is not ``None``, the file name will end with that suffix,
263264
otherwise there will be no suffix. :func:`mkstemp` does not put a dot

0 commit comments

Comments
 (0)