Author: Lukas Diekmann <[email protected]>
Branch: list-strategies
Changeset: r47534:e50d014c1e50
Date: 2011-09-06 13:03 +0200
http://bitbucket.org/pypy/pypy/changeset/e50d014c1e50/

Log:    fixes for intsort compare function

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
@@ -1160,8 +1160,11 @@
         space = self.space
         return space.is_true(space.lt(a, b))
 
-class IntSort(TimSort):
+class IntSort(SimpleSort):
     def lt(self, w_int1, w_int2):
+        from pypy.objspace.std.intobject import W_IntObject
+        assert isinstance(w_int1, W_IntObject)
+        assert isinstance(w_int2, W_IntObject)
         space = self.space
         return w_int1.intval < w_int2.intval
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to