[pypy-commit] pypy list-strategies: Another list init fix
l.diekmann
noreply at buildbot.pypy.org
Fri Sep 23 13:12:29 CEST 2011
Author: Lukas Diekmann <lukas.diekmann at uni-duesseldorf.de>
Branch: list-strategies
Changeset: r47470:1914a506afec
Date: 2011-03-16 11:24 +0100
http://bitbucket.org/pypy/pypy/changeset/1914a506afec/
Log: Another list init fix
diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py
--- a/pypy/objspace/std/listobject.py
+++ b/pypy/objspace/std/listobject.py
@@ -285,8 +285,10 @@
start = l[0]
step = l[1]
length = l[2]
- r = [None] * length
-
+ if wrap_items:
+ r = [None] * length
+ else:
+ r = [0] * length
i = start
n = 0
while n < length:
More information about the pypy-commit
mailing list