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
23a6726b
Commit
23a6726b
authored
Feb 09, 2013
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Plain Diff
Issue #17147. Mention BytesIO in SpooledTemporaryFile documentation.
parents
8135de80
4f169a7a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
Doc/library/tempfile.rst
Doc/library/tempfile.rst
+5
-3
Lib/tempfile.py
Lib/tempfile.py
+2
-2
No files found.
Doc/library/tempfile.rst
View file @
23a6726b
...
...
@@ -82,9 +82,11 @@ The module defines the following user-callable items:
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. This file-like object can be
used in a :keyword:`with` statement, just like a normal file.
is either a :class:`BytesIO` or :class:`StringIO` object (depending on
whether specifies binary or text *mode* was specified) or a true file
object, depending on whether :func:`rollover` has been called. This
file-like object can be used in a :keyword:`with` statement, just like
a normal file.
.. versionchanged:: 3.3
the truncate method now accepts a ``size`` argument.
...
...
Lib/tempfile.py
View file @
23a6726b
...
...
@@ -470,8 +470,8 @@ else:
raise
class
SpooledTemporaryFile
:
"""Temporary file wrapper, specialized to switch from
StringIO to a real file when it exceeds a certain size or
"""Temporary file wrapper, specialized to switch from
BytesIO
or
StringIO to a real file when it exceeds a certain size or
when a fileno is needed.
"""
_rolled
=
False
...
...
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