Author: Lukas Diekmann <[email protected]>
Branch: set-strategies
Changeset: r49270:4f4b06b3d3f8
Date: 2011-11-08 14:34 +0100
http://bitbucket.org/pypy/pypy/changeset/4f4b06b3d3f8/
Log: now we dont reference i before assignment anymore
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
@@ -1213,7 +1213,7 @@
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:
@@ -1227,8 +1227,7 @@
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)):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit