Skip to content

Commit e55de68

Browse files
authored
bpo-41410: Fix outdated info in mkstemp docs (GH-21701)
Automerge-Triggered-By: @ericvsmith
1 parent 6444ca9 commit e55de68

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Doc/library/tempfile.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,8 @@ The module defines the following user-callable items:
175175
If you want to force a bytes return value with otherwise default behavior,
176176
pass ``suffix=b''``.
177177

178-
If *text* is specified, it indicates whether to open the file in binary
179-
mode (the default) or text mode. On some platforms, this makes no
180-
difference.
178+
If *text* is specified and true, the file is opened in text mode.
179+
Otherwise, (the default) the file is opened in binary mode.
181180

182181
:func:`mkstemp` returns a tuple containing an OS-level handle to an open
183182
file (as would be returned by :func:`os.open`) and the absolute pathname

Lib/tempfile.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,7 @@ def mkstemp(suffix=None, prefix=None, dir=None, text=False):
308308
otherwise a default directory is used.
309309
310310
If 'text' is specified and true, the file is opened in text
311-
mode. Else (the default) the file is opened in binary mode. On
312-
some operating systems, this makes no difference.
311+
mode. Else (the default) the file is opened in binary mode.
313312
314313
If any of 'suffix', 'prefix' and 'dir' are not None, they must be the
315314
same type. If they are bytes, the returned name will be bytes; str

0 commit comments

Comments
 (0)