bpo-41410: Fix outdated info in mkstemp docs (GH-21701)
Automerge-Triggered-By: @ericvsmith
(cherry picked from commit e55de68be3
)
Co-authored-by: Rishav Kundu <rk@rishav.io>
This commit is contained in:
parent
75c2281762
commit
7c288413db
|
@ -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,
|
If you want to force a bytes return value with otherwise default behavior,
|
||||||
pass ``suffix=b''``.
|
pass ``suffix=b''``.
|
||||||
|
|
||||||
If *text* is specified, it indicates whether to open the file in binary
|
If *text* is specified and true, the file is opened in text mode.
|
||||||
mode (the default) or text mode. On some platforms, this makes no
|
Otherwise, (the default) the file is opened in binary mode.
|
||||||
difference.
|
|
||||||
|
|
||||||
:func:`mkstemp` returns a tuple containing an OS-level handle to an open
|
: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
|
file (as would be returned by :func:`os.open`) and the absolute pathname
|
||||||
|
|
|
@ -308,8 +308,7 @@ def mkstemp(suffix=None, prefix=None, dir=None, text=False):
|
||||||
otherwise a default directory is used.
|
otherwise a default directory is used.
|
||||||
|
|
||||||
If 'text' is specified and true, the file is opened in text
|
If 'text' is specified and true, the file is opened in text
|
||||||
mode. Else (the default) the file is opened in binary mode. On
|
mode. Else (the default) the file is opened in binary mode.
|
||||||
some operating systems, this makes no difference.
|
|
||||||
|
|
||||||
If any of 'suffix', 'prefix' and 'dir' are not None, they must be the
|
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
|
same type. If they are bytes, the returned name will be bytes; str
|
||||||
|
|
Loading…
Reference in New Issue