Commits

Lukas Diekmann committed 2e5141d

other_w can't be resized

  • Participants
  • Parent commits 4f4b06b
  • Branches set-strategies

Comments (0)

Files changed (1)

pypy/objspace/std/setobject.py

 
 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: