mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
default mode="r" and add optional bufsize
This commit is contained in:
parent
27e177d005
commit
13c503e93b
1 changed files with 2 additions and 2 deletions
|
@ -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'>":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue