]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41410: Fix outdated info in mkstemp docs (GH-21701)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 14 Aug 2020 01:51:21 +0000 (18:51 -0700)
committerGitHub <noreply@github.com>
Fri, 14 Aug 2020 01:51:21 +0000 (18:51 -0700)
Automerge-Triggered-By: @ericvsmith
(cherry picked from commit e55de68be3e5b977a17d3c0ac9805b0feff8fedc)

Co-authored-by: Rishav Kundu <rk@rishav.io>
Doc/library/tempfile.rst
Lib/tempfile.py

index a59817c1039210913ebf5848ddc2cb6447e1d9dc..3a2b88c0cb6a205382c58cc9652ccfeb8fddb50e 100644 (file)
@@ -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
index 5b990e067f23a540827fd20dbb8c9c51f18fa0bb..8f9cb6c3ca350041765821969d025c45424b7144 100644 (file)
@@ -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