summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNadeem Vawda <nadeem.vawda@gmail.com>2012-02-04 11:58:07 (GMT)
committerNadeem Vawda <nadeem.vawda@gmail.com>2012-02-04 11:58:07 (GMT)
commit54d8144bb018979ad1fd6178554cc9c600b5d8a5 (patch)
tree864985de1a5b12dfcecf08c539e98a52bee0c603
parentcac8909d0cfe0f52fd0a0409ca58d46b34e58962 (diff)
downloadcpython-54d8144bb018979ad1fd6178554cc9c600b5d8a5.zip
cpython-54d8144bb018979ad1fd6178554cc9c600b5d8a5.tar.gz
cpython-54d8144bb018979ad1fd6178554cc9c600b5d8a5.tar.bz2
Make BZ2File.__init__()'s fileobj argument keyword-only.
-rw-r--r--Doc/library/bz2.rst2
-rw-r--r--Lib/bz2.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/bz2.rst b/Doc/library/bz2.rst
index dbf938a..7275e12 100644
--- a/Doc/library/bz2.rst
+++ b/Doc/library/bz2.rst
@@ -29,7 +29,7 @@ All of the classes in this module may safely be accessed from multiple threads.
(De)compression of files
------------------------
-.. class:: BZ2File(filename=None, mode='r', buffering=None, compresslevel=9, fileobj=None)
+.. class:: BZ2File(filename=None, mode='r', buffering=None, compresslevel=9, \*, fileobj=None)
Open a bzip2-compressed file.
diff --git a/Lib/bz2.py b/Lib/bz2.py
index 5c228f9..7e1a7e2 100644
--- a/Lib/bz2.py
+++ b/Lib/bz2.py
@@ -40,7 +40,7 @@ class BZ2File(io.BufferedIOBase):
"""
def __init__(self, filename=None, mode="r", buffering=None,
- compresslevel=9, fileobj=None):
+ compresslevel=9, *, fileobj=None):
"""Open a bzip2-compressed file.
If filename is given, open the named file. Otherwise, operate on