Skip to content

Commit 6cba2c6

Browse files
committed
Fix indentation in mkstemp() documentation
Adjust indentation to match the rest of the file formatting.
1 parent 660a89a commit 6cba2c6

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

Doc/library/tempfile.rst

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,19 @@ The module defines the following user-callable items:
220220

221221
.. function:: mkstemp(suffix=None, prefix=None, dir=None, text=False)
222222

223-
Creates a temporary file in the most secure manner possible. There are
224-
no race conditions in the file's creation, assuming that the platform
225-
properly implements the :const:`os.O_EXCL` flag for :func:`os.open`. The
226-
file is readable and writable only by the creating user ID. If the
227-
platform uses permission bits to indicate whether a file is executable,
228-
the file is executable by no one. On platforms that support the :const:
229-
`os.O_CLOEXEC` flag, the file descriptor has the close-on-exec flag set,
230-
which prevents it from being inherited across :func:`os.exec*` calls.
231-
However, the file descriptor will still be inherited by child processes created via :func:`os.fork`.
223+
Creates a temporary file in the most secure manner possible. There are
224+
no race conditions in the file's creation, assuming that the platform
225+
properly implements the :const:`os.O_EXCL` flag for :func:`os.open`. The
226+
file is readable and writable only by the creating user ID. If the
227+
platform uses permission bits to indicate whether a file is executable,
228+
the file is executable by no one.
229+
230+
On platforms that support the :const:`os.O_CLOEXEC` flag, the file
231+
descriptor is created with the close-on-exec flag set. This prevents it
232+
from being inherited across ``exec*``-style calls that replace the current
233+
process image. However, the file descriptor will still be inherited by
234+
child processes created via :func:`os.fork`.
235+
232236

233237
Unlike :func:`TemporaryFile`, the user of :func:`mkstemp` is responsible
234238
for deleting the temporary file when done with it.

0 commit comments

Comments
 (0)