]> granicus.if.org Git - python/commitdiff
Make BZ2File.__init__()'s fileobj argument keyword-only.
authorNadeem Vawda <nadeem.vawda@gmail.com>
Sat, 4 Feb 2012 11:58:07 +0000 (13:58 +0200)
committerNadeem Vawda <nadeem.vawda@gmail.com>
Sat, 4 Feb 2012 11:58:07 +0000 (13:58 +0200)
Doc/library/bz2.rst
Lib/bz2.py

index dbf938a2c4cabad01dafb1a5623e12e6049a1267..7275e1263d0697bea8a6141cafdc9c4e90222f23 100644 (file)
@@ -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.
 
index 5c228f95e5a7665479ce974866755ea5c364c0a8..7e1a7e29c663144d8feccc5c5622748da6215e0d 100644 (file)
@@ -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