Commits

Lukas Diekmann committed 4f4b06b

now we dont reference i before assignment anymore

Comments (0)

Files changed (1)

pypy/objspace/std/setobject.py

     others_w.append(w_left)
 
     # find smallest set in others_w to reduce comparisons
-    startindex, startlength = -1, -1
+    i, startindex, startlength = 0, -1, -1
     for i in range(len(others_w)):
         w_other = others_w[i]
         try:
             startindex = i
             startlength = length
 
-    if i > 0:
-        others_w[i], others_w[0] = others_w[0], others_w[i]
+    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)):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.