[Python-checkins] bpo-41410: Fix outdated info in mkstemp docs (GH-21701)

Miss Islington (bot) webhook-mailer at python.org
Thu Aug 13 21:51:29 EDT 2020


https://github.com/python/cpython/commit/2a9f709ba23c8f6aa2bed821aacc4e7baecde383
commit: 2a9f709ba23c8f6aa2bed821aacc4e7baecde383
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2020-08-13T18:51:21-07:00
summary:

bpo-41410: Fix outdated info in mkstemp docs (GH-21701)


Automerge-Triggered-By: @ericvsmith
(cherry picked from commit e55de68be3e5b977a17d3c0ac9805b0feff8fedc)

Co-authored-by: Rishav Kundu <rk at rishav.io>

files:
M Doc/library/tempfile.rst
M Lib/tempfile.py

diff --git a/Doc/library/tempfile.rst b/Doc/library/tempfile.rst
index a59817c103921..3a2b88c0cb6a2 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 5b990e067f23a..8f9cb6c3ca350 100644
--- a/Lib/tempfile.py
+++ b/Lib/tempfile.py
@@ -307,8 +307,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



More information about the Python-checkins mailing list