Skip to content

Commit 624e398

Browse files
authored
Correctly document class instead of function (GH-32016)
1 parent b0f886d commit 624e398

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/library/tempfile.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ The module defines the following user-callable items:
9999
Added *errors* parameter.
100100

101101

102-
.. function:: SpooledTemporaryFile(max_size=0, mode='w+b', buffering=-1, encoding=None, newline=None, suffix=None, prefix=None, dir=None, *, errors=None)
102+
.. class:: SpooledTemporaryFile(max_size=0, mode='w+b', buffering=-1, encoding=None, newline=None, suffix=None, prefix=None, dir=None, *, errors=None)
103103

104-
This function operates exactly as :func:`TemporaryFile` does, except that
104+
This class operates exactly as :func:`TemporaryFile` does, except that
105105
data is spooled in memory until the file size exceeds *max_size*, or
106106
until the file's :func:`fileno` method is called, at which point the
107107
contents are written to disk and operation proceeds as with
@@ -124,9 +124,9 @@ The module defines the following user-callable items:
124124
Added *errors* parameter.
125125

126126

127-
.. function:: TemporaryDirectory(suffix=None, prefix=None, dir=None, ignore_cleanup_errors=False)
127+
.. class:: TemporaryDirectory(suffix=None, prefix=None, dir=None, ignore_cleanup_errors=False)
128128

129-
This function securely creates a temporary directory using the same rules as :func:`mkdtemp`.
129+
This class securely creates a temporary directory using the same rules as :func:`mkdtemp`.
130130
The resulting object can be used as a context manager (see
131131
:ref:`tempfile-examples`). On completion of the context or destruction
132132
of the temporary directory object, the newly created temporary directory

0 commit comments

Comments
 (0)