Commits

Maciej Fijalkowski committed 4daed7b

Make it possible to have multiple subclasses of TimSort mixed together, if
necessary

Comments (0)

Files changed (1)

rpython/rlib/listsort.py

 ##         Adapted from CPython, original code and algorithms by Tim Peters
 
 def make_timsort_class(getitem=None, setitem=None, length=None,
-                       getitem_slice=None, lt=None):
+                       getitem_slice=None, lt=None, base_class=object):
 
     if getitem is None:
         def getitem(list, item):
         def lt(a, b):
             return a < b
 
-    class TimSort(object):
+    class TimSort(base_class):
         """TimSort(list).sort()
 
         Sorts the list in-place, using the overridable method lt() for comparison.