[pypy-svn] r14684 - pypy/dist/pypy/objspace/std

ac at codespeak.net ac at codespeak.net
Fri Jul 15 10:54:33 CEST 2005


Author: ac
Date: Fri Jul 15 10:54:33 2005
New Revision: 14684

Modified:
   pypy/dist/pypy/objspace/std/listobject.py
Log:
Only use range() in a for-statement.

Modified: pypy/dist/pypy/objspace/std/listobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/listobject.py	(original)
+++ pypy/dist/pypy/objspace/std/listobject.py	Fri Jul 15 10:54:33 2005
@@ -331,7 +331,6 @@
               "assign sequence of size %d to extended slice of size %d" %
               (len2,slicelength)))
 
-    r = range(len2)
     items = w_list.ob_item
     if sequence2 is items:
         if step > 0:
@@ -342,7 +341,7 @@
         else:
             # Make a shallow copy to more easily handle the reversal case
             sequence2 = list(sequence2)
-    for i in r:
+    for i in range(len2):
         items[start+i*step] = sequence2[i]
     return space.w_None
 



More information about the Pypy-commit mailing list