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
50cb936b
Commit
50cb936b
authored
Jun 04, 2012
by
Nadeem Vawda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify acceptable values for BZ2File.__init__'s mode argument.
parent
aebcdba8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
Doc/library/bz2.rst
Doc/library/bz2.rst
+5
-3
Lib/bz2.py
Lib/bz2.py
+2
-2
No files found.
Doc/library/bz2.rst
View file @
50cb936b
...
...
@@ -35,9 +35,11 @@ All of the classes in this module may safely be accessed from multiple threads.
be used to read or write the compressed data.
The *mode* argument can be either ``'r'`` for reading (default), ``'w'`` for
overwriting, or ``'a'`` for appending. If *filename* is a file object (rather
than an actual file name), a mode of ``'w'`` does not truncate the file, and
is instead equivalent to ``'a'``.
overwriting, or ``'a'`` for appending. These can equivalently be given as
``'rb'``, ``'wb'``, and ``'ab'`` respectively.
If *filename* is a file object (rather than an actual file name), a mode of
``'w'`` does not truncate the file, and is instead equivalent to ``'a'``.
The *buffering* argument is ignored. Its use is deprecated.
...
...
Lib/bz2.py
View file @
50cb936b
...
...
@@ -46,8 +46,8 @@ class BZ2File(io.BufferedIOBase):
be opened. Otherwise, it should be a file object, which will be used to
read or write the compressed data.
mode can be 'r' for reading (default), 'w' for (over)writing, or
'a' for appending
.
mode can be 'r' for reading (default), 'w' for (over)writing, or
'a' for
appending. These can equivalently be given as 'rb', 'wb', and 'ab'
.
buffering is ignored. Its use is deprecated.
...
...
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