[pypy-commit] pypy set-strategies: other_w can't be resized

l.diekmann noreply at buildbot.pypy.org
Thu Nov 10 13:52:42 CET 2011


Author: Lukas Diekmann <lukas.diekmann at uni-duesseldorf.de>
Branch: set-strategies
Changeset: r49271:2e5141d8fd6c
Date: 2011-11-08 16:31 +0100
http://bitbucket.org/pypy/pypy/changeset/2e5141d8fd6c/

Log:	other_w can't be resized

diff --git a/pypy/objspace/std/setobject.py b/pypy/objspace/std/setobject.py
--- a/pypy/objspace/std/setobject.py
+++ b/pypy/objspace/std/setobject.py
@@ -1210,10 +1210,11 @@
 
 def _intersection_multiple(space, w_left, others_w):
     #XXX find smarter implementations
+    others_w = others_w[:] # original others_w can't be resized
     others_w.append(w_left)
 
     # find smallest set in others_w to reduce comparisons
-    i, startindex, startlength = 0, -1, -1
+    startindex, startlength = -1, -1
     for i in range(len(others_w)):
         w_other = others_w[i]
         try:


More information about the pypy-commit mailing list