Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c4768a4a
Commit
c4768a4a
authored
Jan 06, 2008
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1615275: clarify return object types of different tempfile factories.
parent
91a4808a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
Doc/library/tempfile.rst
Doc/library/tempfile.rst
+12
-1
No files found.
Doc/library/tempfile.rst
View file @
c4768a4a
...
...
@@ -34,7 +34,7 @@ The module defines the following user-callable functions:
.. function:: TemporaryFile([mode='w+b'[, bufsize=-1[, suffix[, prefix[, dir]]]]])
Return a file
(or file-like)
object that can be used as a temporary storage
Return a file
-like
object that can be used as a temporary storage
area. The file is created using :func:`mkstemp`. It will be destroyed as soon
as it is closed (including an implicit close when the object is garbage
collected). Under Unix, the directory entry for the file is removed immediately
...
...
@@ -49,6 +49,10 @@ The module defines the following user-callable functions:
The *dir*, *prefix* and *suffix* parameters are passed to :func:`mkstemp`.
The returned object is a true file object on POSIX platforms. On other
platforms, it is a file-like object whose :attr:`file` attribute is the
underlying true file object.
.. function:: NamedTemporaryFile([mode='w+b'[, bufsize=-1[, suffix[, prefix[, dir[, delete]]]]]])
...
...
@@ -60,6 +64,9 @@ The module defines the following user-callable functions:
across platforms (it can be so used on Unix; it cannot on Windows NT or later).
If *delete* is true (the default), the file is deleted as soon as it is closed.
The returned object is always a file-like object whose :attr:`file` attribute
is the underlying true file object.
.. versionadded:: 2.3
.. versionadded:: 2.6
...
...
@@ -76,6 +83,10 @@ The module defines the following user-callable functions:
The resulting file has one additional method, :func:`rollover`, which causes the
file to roll over to an on-disk file regardless of its size.
The returned object is a file-like object whose :attr:`_file` attribute
is either a :class:`StringIO` object or a true file object, depending on
whether :func:`rollover` has been called.
.. versionadded:: 2.6
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment