8000 Correctly document class instead of function (GH-32016) · varunsh-coder/cpython@4298114 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4298114

Browse files
Correctly document class instead of function (pythonGH-32016)
(cherry picked from commit 624e398) Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
1 parent 832be8f commit 4298114

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/library/tempfile.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ The module defines the following user-callable items:
9696
Added *errors* parameter.
9797

9898

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

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

123123

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

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

0 commit comments

Comments
 (0)
0