Feel free to clean things up, the current code is an antique and rather ugly. I started to do something about it when the generic sorts went in but never finished it up and have an orphaned branch that has languished for probably two years. The libc qsort used to be used, which is why the inherited interface. The generic code probably needs to run with the GIL held in case the comparison function raises an error. If pushed down far enough, I think the comparison function can be left on the stack. The LT function will need a rewrite for this case.

Note that none of these functions are currently public, so you can mess around with them. If you do clean up the call, might be best to make it a separate PR that can go in before this.