diff Lib/StringIO.py @ 3352:81f45f69388e legacy-trunk

fix default arg for read() -- should be -1
author Guido van Rossum <guido@python.org>
date Thu, 25 Jan 1996 17:34:14 +0000
parents 1eeeba09a306
children 818ee115054a
line wrap: on
line diff
--- a/Lib/StringIO.py	Thu Jan 25 17:31:58 1996 +0000
+++ b/Lib/StringIO.py	Thu Jan 25 17:34:14 1996 +0000
@@ -48,8 +48,8 @@
 		self.pos = max(0, pos)
 	def tell(self):
 		return self.pos
-	def read(self, n = 0):
-		if n <= 0:
+	def read(self, n = -1):
+		if n < 0:
 			newpos = len(self.buf)
 		else:
 			newpos = min(self.pos+n, len(self.buf))