Skip to content

Commit 87120b9

Browse files
committed
Apply review feedback
1 parent eb61e19 commit 87120b9

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎Doc/library/tempfile.rst‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@ The module defines the following user-callable items:
3232
.. function:: TemporaryFile(mode='w+b', buffering=-1, encoding=None, newline=None, suffix=None, prefix=None, dir=None, *, errors=None)
3333

3434
Return a :term:`file-like object` that can be used as a temporary storage area.
35-
The file is created securely, using the same rules as :func:`mkstemp`.
35+
The file is created securely, using the same rules as :func:`mkstemp`,
36+
and the object can be used as a context manager
37+
(see :ref:`tempfile-examples`).
38+
3639
Under Unix, the directory entry for the file is either not created at all or is
3740
removed immediately after the file is created. Other platforms do not support
3841
this; your code should not rely on a temporary file created using this
3942
function having or not having a visible name in the file system.
4043

41-
The temporary file will be removed from the file system under the following conditions:
42-
43-
- It is closed.
44-
- or, it is garbage collected (and is implicitly closed)
45-
- or, at the completion of the context if used as a context manager (see
46-
:ref:`tempfile-examples`)
44+
The file will be removed from the file system when the object is closed or
45+
garbage collected (and implicitly closed). Exiting the context manager
46+
closes the file.
4747

4848
The *mode* parameter defaults to ``'w+b'`` so that the file created can
4949
be read and written without being closed. Binary mode is used so that it

0 commit comments

Comments
 (0)