]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
default mode="r" and add optional bufsize
authorGuido van Rossum <guido@python.org>
Thu, 16 Mar 1995 15:58:12 +0000 (15:58 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 16 Mar 1995 15:58:12 +0000 (15:58 +0000)
Lib/posixfile.py

index fbb24ff8972799ea90bd8310a40899a86c247067..0140e1dd1b7f3f504f50ca0735408132b7019d4d 100644 (file)
@@ -76,9 +76,9 @@ class _posixfile_:
     #
     # Initialization routines
     #
-    def open(self, name, mode):
+    def open(self, name, mode='r', bufsize=-1):
        import __builtin__
-       return self.fileopen(__builtin__.open(name, mode))
+       return self.fileopen(__builtin__.open(name, mode, bufsize))
 
     def fileopen(self, file):
        if `type(file)` != "<type 'file'>":