]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
optional mode, bufsize for global function open()
authorGuido van Rossum <guido@python.org>
Thu, 23 Mar 1995 10:39:49 +0000 (10:39 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 23 Mar 1995 10:39:49 +0000 (10:39 +0000)
Lib/posixfile.py

index 0140e1dd1b7f3f504f50ca0735408132b7019d4d..8036b9d9bf65e0994b4d894e5de406448ba72627 100644 (file)
@@ -5,7 +5,7 @@
 #
 # Extended file operations
 #
-# f = posixfile.open(filename, mode)
+# f = posixfile.open(filename, [mode, [bufsize]])
 #      will create a new posixfile object
 #
 # f = posixfile.fileopen(fileobject)
@@ -189,8 +189,8 @@ class _posixfile_:
 #
 # Public routine to obtain a posixfile object
 #
-def open(name, mode):
-    return _posixfile_().open(name, mode)
+def open(name, mode='r', bufsize=-1):
+    return _posixfile_().open(name, mode, bufsize)
 
 def fileopen(file):
     return _posixfile_().fileopen(file)