summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRishav Kundu <rk@rishav.io>2020-08-14 01:33:14 (GMT)
committerGitHub <noreply@github.com>2020-08-14 01:33:14 (GMT)
commite55de68be3e5b977a17d3c0ac9805b0feff8fedc (patch)
tree7fd279053de65f90a6163005ae2ce8ae1476a100
parent6444ca946984c638c67a72aac22fd6d3cc650c16 (diff)
downloadcpython-e55de68be3e5b977a17d3c0ac9805b0feff8fedc.zip
cpython-e55de68be3e5b977a17d3c0ac9805b0feff8fedc.tar.gz
cpython-e55de68be3e5b977a17d3c0ac9805b0feff8fedc.tar.bz2
bpo-41410: Fix outdated info in mkstemp docs (GH-21701)
Automerge-Triggered-By: @ericvsmith
-rw-r--r--Doc/library/tempfile.rst5
-rw-r--r--Lib/tempfile.py3
2 files changed, 3 insertions, 5 deletions
diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst
index a59817c..3a2b88c 100644
--- a/Doc/library/tempfile.rst
+++ b/Doc/library/tempfile.rst
@@ -175,9 +175,8 @@ The module defines the following user-callable items:
If you want to force a bytes return value with otherwise default behavior,
pass ``suffix=b''``.
- If *text* is specified, it indicates whether to open the file in binary
- mode (the default) or text mode. On some platforms, this makes no
- difference.
+ If *text* is specified and true, the file is opened in text mode.
+ Otherwise, (the default) the file is opened in binary mode.
:func:`mkstemp` returns a tuple containing an OS-level handle to an open
file (as would be returned by :func:`os.open`) and the absolute pathname
diff --git a/Lib/tempfile.py b/Lib/tempfile.py
index ba04be8..770f72c 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -308,8 +308,7 @@ def mkstemp(suffix=None, prefix=None, dir=None, text=False):
otherwise a default directory is used.
If 'text' is specified and true, the file is opened in text
- mode. Else (the default) the file is opened in binary mode. On
- some operating systems, this makes no difference.
+ mode. Else (the default) the file is opened in binary mode.
If any of 'suffix', 'prefix' and 'dir' are not None, they must be the
same type. If they are bytes, the returned name will be bytes; str