Commits

Lukas Diekmann  committed fc5601b

referenced i before assignment if others_w is None/empty

  • Participants
  • Parent commits 0bf8d50
  • Branches set-strategies

Comments (0)

Files changed (1)

File pypy/objspace/std/setobject.py

             startindex = i
             startlength = length
 
-    others_w[i], others_w[0] = others_w[0], others_w[i]
+    if i > 0:
+        others_w[i], others_w[0] = others_w[0], others_w[i]
 
     result = w_left._newobj(space, others_w[0])
     for i in range(1,len(others_w)):