Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Doc/library/tempfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions Lib/tempfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down