mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
optional mode, bufsize for global function open()
This commit is contained in:
parent
cca8d2bb48
commit
28aa229fa3
1 changed files with 3 additions and 3 deletions
|
@ -5,7 +5,7 @@
|
||||||
#
|
#
|
||||||
# Extended file operations
|
# Extended file operations
|
||||||
#
|
#
|
||||||
# f = posixfile.open(filename, mode)
|
# f = posixfile.open(filename, [mode, [bufsize]])
|
||||||
# will create a new posixfile object
|
# will create a new posixfile object
|
||||||
#
|
#
|
||||||
# f = posixfile.fileopen(fileobject)
|
# f = posixfile.fileopen(fileobject)
|
||||||
|
@ -189,8 +189,8 @@ class _posixfile_:
|
||||||
#
|
#
|
||||||
# Public routine to obtain a posixfile object
|
# Public routine to obtain a posixfile object
|
||||||
#
|
#
|
||||||
def open(name, mode):
|
def open(name, mode='r', bufsize=-1):
|
||||||
return _posixfile_().open(name, mode)
|
return _posixfile_().open(name, mode, bufsize)
|
||||||
|
|
||||||
def fileopen(file):
|
def fileopen(file):
|
||||||
return _posixfile_().fileopen(file)
|
return _posixfile_().fileopen(file)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue