summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslateny <46876382+slateny@users.noreply.github.com>2022-03-23 14:39:07 (GMT)
committerGitHub <noreply@github.com>2022-03-23 14:39:07 (GMT)
commit624e3986fbf8467772e4863b7ec004e65adff619 (patch)
tree6f7aaa8dd280e5dd18eb432ca659e17dbad285a7
parentb0f886d1bca499db1118a60b707923fa8e157073 (diff)
downloadcpython-624e3986fbf8467772e4863b7ec004e65adff619.zip
cpython-624e3986fbf8467772e4863b7ec004e65adff619.tar.gz
cpython-624e3986fbf8467772e4863b7ec004e65adff619.tar.bz2
Correctly document class instead of function (GH-32016)
-rw-r--r--Doc/library/tempfile.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst
index 3184e50..c97d119 100644
--- a/Doc/library/tempfile.rst
+++ b/Doc/library/tempfile.rst
@@ -99,9 +99,9 @@ The module defines the following user-callable items:
Added *errors* parameter.
-.. function:: SpooledTemporaryFile(max_size=0, mode='w+b', buffering=-1, encoding=None, newline=None, suffix=None, prefix=None, dir=None, *, errors=None)
+.. class:: SpooledTemporaryFile(max_size=0, mode='w+b', buffering=-1, encoding=None, newline=None, suffix=None, prefix=None, dir=None, *, errors=None)
- This function operates exactly as :func:`TemporaryFile` does, except that
+ This class operates exactly as :func:`TemporaryFile` does, except that
data is spooled in memory until the file size exceeds *max_size*, or
until the file's :func:`fileno` method is called, at which point the
contents are written to disk and operation proceeds as with
@@ -124,9 +124,9 @@ The module defines the following user-callable items:
Added *errors* parameter.
-.. function:: TemporaryDirectory(suffix=None, prefix=None, dir=None, ignore_cleanup_errors=False)
+.. class:: TemporaryDirectory(suffix=None, prefix=None, dir=None, ignore_cleanup_errors=False)
- This function securely creates a temporary directory using the same rules as :func:`mkdtemp`.
+ This class securely creates a temporary directory using the same rules as :func:`mkdtemp`.
The resulting object can be used as a context manager (see
:ref:`tempfile-examples`). On completion of the context or destruction
of the temporary directory object, the newly created temporary directory