default mode="r" and add optional bufsize

This commit is contained in:
Guido van Rossum 1995-03-16 15:58:12 +00:00
parent 27e177d005
commit 13c503e93b
1 changed files with 2 additions and 2 deletions

View File

@ -76,9 +76,9 @@ def __del__(self):
#
# 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'>":