summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-03-23 10:39:49 (GMT)
committerGuido van Rossum <guido@python.org>1995-03-23 10:39:49 (GMT)
commit28aa229fa314b3257d5a846aa2c0f1f6f56261c6 (patch)
tree41047f36d69ced303ff2f6bbb7fd3a80160cfa32 /Lib
parentcca8d2bb48342a2e88be7259af3c75871b992ce8 (diff)
downloadcpython-28aa229fa314b3257d5a846aa2c0f1f6f56261c6.zip
cpython-28aa229fa314b3257d5a846aa2c0f1f6f56261c6.tar.gz
cpython-28aa229fa314b3257d5a846aa2c0f1f6f56261c6.tar.bz2
optional mode, bufsize for global function open()
Diffstat (limited to 'Lib')
-rw-r--r--Lib/posixfile.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/posixfile.py b/Lib/posixfile.py
index 0140e1d..8036b9d 100644
--- a/Lib/posixfile.py
+++ b/Lib/posixfile.py
@@ -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)