Commits

Philip Jenvey  committed 98149fa

fix range __length_hint__, test_xrange -> test_range

  • Participants
  • Parent commits 68ad4df
  • Branches py3k

Comments (0)

Files changed (2)

File pypy/module/__builtin__/functional.py

         raise OperationError(space.w_StopIteration, space.w_None)
 
     def descr_len(self, space):
-        return space.sub(self.w_length, self.w_index)
+        return space.sub(self.w_len, self.w_index)
 
     def descr_reduce(self, space):
         from pypy.interpreter.mixedmodule import MixedModule

File pypy/objspace/std/test/test_lengthhint.py

             space.call_method(w_reversed, '__length_hint__')) == self.SIZE
         self._test_length_hint(w_reversed)
 
-    def test_xrange(self):
+    def test_range(self):
         space = self.space
-        w_xrange = space.call_method(space.builtin, 'xrange',
+        w_range = space.call_method(space.builtin, 'range',
                                      space.newint(self.SIZE))
-        self._test_length_hint(w_xrange)
+        self._test_length_hint(w_range)
 
     def test_itertools_repeat(self):
         space = self.space