Commits

Guido van Rossum  committed 919c53a

default mode="r" and add optional bufsize

  • Participants
  • Parent commits 912813d
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Lib/posixfile.py

     #
     # 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'>":