[Python-checkins] cpython (merge 3.5 -> default): Issue #26261: Merge NamedTemporaryFile docs from 3.5
martin.panter
python-checkins at python.org
Mon Feb 22 05:12:10 EST 2016
https://hg.python.org/cpython/rev/837bae8c8ae7
changeset: 100294:837bae8c8ae7
parent: 100291:c2b594cecdcc
parent: 100293:f1982e1426ce
user: Martin Panter <vadmium+py at gmail.com>
date: Mon Feb 22 10:10:55 2016 +0000
summary:
Issue #26261: Merge NamedTemporaryFile docs from 3.5
files:
Doc/library/tempfile.rst | 3 ++-
Lib/tempfile.py | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst
--- a/Doc/library/tempfile.rst
+++ b/Doc/library/tempfile.rst
@@ -74,7 +74,8 @@
This function operates exactly as :func:`TemporaryFile` does, except that
the file is guaranteed to have a visible name in the file system (on
Unix, the directory entry is not unlinked). That name can be retrieved
- from the :attr:`name` attribute of the file object. Whether the name can be
+ from the :attr:`name` attribute of the returned
+ file-like object. Whether the name can be
used to open the file a second time, while the named temporary file is
still open, varies across platforms (it can be so used on Unix; it cannot
on Windows NT or later). If *delete* is true (the default), the file is
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -533,8 +533,8 @@
The file is created as mkstemp() would do it.
Returns an object with a file-like interface; the name of the file
- is accessible as file.name. The file will be automatically deleted
- when it is closed unless the 'delete' argument is set to False.
+ is accessible as its 'name' attribute. The file will be automatically
+ deleted when it is closed unless the 'delete' argument is set to False.
"""
prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list