diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-03-23 16:17:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-23 16:17:53 (GMT) |
commit | 4298114e1d6ff2063a0d4b8a6cf191b59b418975 (patch) | |
tree | 21c31ca60fef940e5c1ec87449c38bcb7e07ea4b /Doc/library | |
parent | 832be8f1d4c5f62623e382dd0df8fe3f38079040 (diff) | |
download | cpython-4298114e1d6ff2063a0d4b8a6cf191b59b418975.zip cpython-4298114e1d6ff2063a0d4b8a6cf191b59b418975.tar.gz cpython-4298114e1d6ff2063a0d4b8a6cf191b59b418975.tar.bz2 |
Correctly document class instead of function (GH-32016)
(cherry picked from commit 624e3986fbf8467772e4863b7ec004e65adff619)
Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/tempfile.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst index 6b23a1b..30491d4 100644 --- a/Doc/library/tempfile.rst +++ b/Doc/library/tempfile.rst @@ -96,9 +96,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 @@ -121,9 +121,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 |