[pypy-commit] pypy default: rename argument for consistency with RFile
rlamy
noreply at buildbot.pypy.org
Mon Sep 1 03:38:07 CEST 2014
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch:
Changeset: r73253:71ab012c8eca
Date: 2014-09-01 02:37 +0100
http://bitbucket.org/pypy/pypy/changeset/71ab012c8eca/
Log: rename argument for consistency with RFile
diff --git a/rpython/rlib/rStringIO.py b/rpython/rlib/rStringIO.py
--- a/rpython/rlib/rStringIO.py
+++ b/rpython/rlib/rStringIO.py
@@ -125,19 +125,19 @@
assert result >= 0
return result
- def read(self, n=-1):
+ def read(self, size=-1):
p = self.__pos
- if p == 0 and n < 0:
+ if p == 0 and size < 0:
self.__pos = AT_END
return self.getvalue() # reading everything
- if p == AT_END or n == 0:
+ if p == AT_END or size == 0:
return ''
assert p >= 0
self.__copy_into_bigbuffer()
mysize = len(self.__bigbuffer)
count = mysize - p
- if n >= 0:
- count = min(n, count)
+ if size >= 0:
+ count = min(size, count)
if count <= 0:
return ''
if p == 0 and count == mysize:
More information about the pypy-commit
mailing list