Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r57821:95dbd25adece Date: 2012-10-07 17:16 +0200 http://bitbucket.org/pypy/pypy/changeset/95dbd25adece/
Log: Use StringBuilder here too. diff --git a/pypy/module/_file/interp_file.py b/pypy/module/_file/interp_file.py --- a/pypy/module/_file/interp_file.py +++ b/pypy/module/_file/interp_file.py @@ -185,7 +185,7 @@ return stream.readline() else: # very inefficient unless there is a peek() - result = [] + result = StringBuilder() while size > 0: # "peeks" on the underlying stream to see how many chars # we can safely read without reading past an end-of-line @@ -200,7 +200,7 @@ if c.endswith('\n'): break size -= len(c) - return ''.join(result) + return result.build() @unwrap_spec(size=int) def direct_readlines(self, size=0): _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit