Kaydet (Commit) 13c503e9 authored tarafından Guido van Rossum's avatar Guido van Rossum

default mode="r" and add optional bufsize

üst 27e177d0
...@@ -76,9 +76,9 @@ class _posixfile_: ...@@ -76,9 +76,9 @@ class _posixfile_:
# #
# Initialization routines # Initialization routines
# #
def open(self, name, mode): def open(self, name, mode='r', bufsize=-1):
import __builtin__ import __builtin__
return self.fileopen(__builtin__.open(name, mode)) return self.fileopen(__builtin__.open(name, mode, bufsize))
def fileopen(self, file): def fileopen(self, file):
if `type(file)` != "<type 'file'>": if `type(file)` != "<type 'file'>":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment