[pypy-commit] pypy default: Use the newly RPython list(string) here
arigo
noreply at buildbot.pypy.org
Thu Sep 4 17:36:22 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r73304:1ee3f38d059e
Date: 2014-09-04 17:35 +0200
http://bitbucket.org/pypy/pypy/changeset/1ee3f38d059e/
Log: Use the newly RPython list(string) here
diff --git a/pypy/module/_io/interp_stringio.py b/pypy/module/_io/interp_stringio.py
--- a/pypy/module/_io/interp_stringio.py
+++ b/pypy/module/_io/interp_stringio.py
@@ -86,7 +86,7 @@
initval = space.unicode_w(w_initval)
size = len(initval)
self.resize_buffer(size)
- self.buf = [c for c in initval]
+ self.buf = list(initval)
pos = space.getindex_w(w_pos, space.w_TypeError)
if pos < 0:
raise OperationError(space.w_ValueError,
diff --git a/pypy/objspace/std/bytearrayobject.py b/pypy/objspace/std/bytearrayobject.py
--- a/pypy/objspace/std/bytearrayobject.py
+++ b/pypy/objspace/std/bytearrayobject.py
@@ -534,7 +534,7 @@
if not e.match(space, space.w_TypeError):
raise
else:
- return [c for c in buf.as_str()]
+ return list(buf.as_str())
# sequence of bytes
w_iter = space.iter(w_source)
More information about the pypy-commit
mailing list