Skip to content

Commit fe93283

Browse files
committed
Issue python#26261: Merge NamedTemporaryFile docs from 3.5
2 parents 0d34530 + 1f0e1f3 commit fe93283

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Doc/library/tempfile.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ The module defines the following user-callable items:
7474
This function operates exactly as :func:`TemporaryFile` does, except that
7575
the file is guaranteed to have a visible name in the file system (on
7676
Unix, the directory entry is not unlinked). That name can be retrieved
77-
from the :attr:`name` attribute of the file object. Whether the name can be
77+
from the :attr:`name` attribute of the returned
78+
file-like object. Whether the name can be
7879
used to open the file a second time, while the named temporary file is
7980
still open, varies across platforms (it can be so used on Unix; it cannot
8081
on Windows NT or later). If *delete* is true (the default), the file is

Lib/tempfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,8 @@ def NamedTemporaryFile(mode='w+b', buffering=-1, encoding=None,
533533
The file is created as mkstemp() would do it.
534534
535535
Returns an object with a file-like interface; the name of the file
536-
is accessible as file.name. The file will be automatically deleted
537-
when it is closed unless the 'delete' argument is set to False.
536+
is accessible as its 'name' attribute. The file will be automatically
537+
deleted when it is closed unless the 'delete' argument is set to False.
538538
"""
539539

540540
prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)

0 commit comments

Comments
 (0)