[pypy-commit] pypy list-strategies: quicksort rpython fix

l.diekmann noreply at buildbot.pypy.org
Fri Sep 23 13:15:02 CEST 2011


Author: Lukas Diekmann <lukas.diekmann at uni-duesseldorf.de>
Branch: list-strategies
Changeset: r47532:94348703e47e
Date: 2011-09-02 13:33 +0200
http://bitbucket.org/pypy/pypy/changeset/94348703e47e/

Log:	quicksort rpython fix

diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py
--- a/pypy/objspace/std/listobject.py
+++ b/pypy/objspace/std/listobject.py
@@ -760,8 +760,7 @@
 
     def custom_sort_for_ints(self, w_list):
         l = self.cast_from_void_star(w_list.lstorage)
-        print l
-        self.quicksort(l)
+        self.quicksort(l, 0, len(l) - 1)
 
     def partition(self, l, start, end):
         left = start
@@ -784,12 +783,7 @@
 
         return left
 
-    def quicksort(self, l, start=None, end=None):
-        if start is None:
-            start = 0
-        if end is None:
-            end = len(l) - 1
-
+    def quicksort(self, l, start, end):
         if start < end:
             p = self.partition(l, start, end)
             self.quicksort(l, start, p - 1)


More information about the pypy-commit mailing list