[pypy-svn] r58258 - pypy/branch/tuple-nonresizable-395/pypy/interpreter
arigo at codespeak.net
arigo at codespeak.net
Sat Sep 20 13:02:12 CEST 2008
Author: arigo
Date: Sat Sep 20 13:02:09 2008
New Revision: 58258
Modified:
pypy/branch/tuple-nonresizable-395/pypy/interpreter/pycode.py
Log:
Don't rely on listcompr here either.
Modified: pypy/branch/tuple-nonresizable-395/pypy/interpreter/pycode.py
==============================================================================
--- pypy/branch/tuple-nonresizable-395/pypy/interpreter/pycode.py (original)
+++ pypy/branch/tuple-nonresizable-395/pypy/interpreter/pycode.py Sat Sep 20 13:02:09 2008
@@ -15,8 +15,12 @@
# helper
-def unpack_str_tuple(space,w_str_tuple):
- return [space.str_w(w_el) for w_el in space.unpackiterable(w_str_tuple)]
+def unpack_str_tuple(space, w_str_tuple):
+ items_w = space.viewiterable(w_str_tuple)
+ result = [None] * len(items_w)
+ for i in range(len(items_w)):
+ result[i] = space.str_w(items_w[i])
+ return result
# code object contants, for co_flags below
CO_OPTIMIZED = 0x0001
More information about the Pypy-commit
mailing list