[pypy-svn] r39926 - pypy/branch/pypy-2.5/pypy/module/__builtin__

gbrandl at codespeak.net gbrandl at codespeak.net
Sun Mar 4 21:41:03 CET 2007


Author: gbrandl
Date: Sun Mar  4 21:41:00 2007
New Revision: 39926

Modified:
   pypy/branch/pypy-2.5/pypy/module/__builtin__/app_functional.py
Log:
Fix xrange on py.py.


Modified: pypy/branch/pypy-2.5/pypy/module/__builtin__/app_functional.py
==============================================================================
--- pypy/branch/pypy-2.5/pypy/module/__builtin__/app_functional.py	(original)
+++ pypy/branch/pypy-2.5/pypy/module/__builtin__/app_functional.py	Sun Mar  4 21:41:00 2007
@@ -4,8 +4,7 @@
 """
 from __future__ import generators
 
-
-from operator import lt, gt, index
+from operator import lt, gt
 
 
 def sum(sequence, total=0):
@@ -349,7 +348,8 @@
 
     def __getitem__(self, i):
         # xrange does NOT support slicing
-        i = index(i)
+        import operator
+        i = operator.index(i)
         len = self.len 
         if i < 0:
             i += len



More information about the Pypy-commit mailing list