Yikes! Even though it sounds like it would be quite difficult to exploit on Python, I would hope this would be fixed properly.
Formal methods rock. Also finding a super subtle bug (exploitable to cause a bounds check failure)!
http://envisage-project.eu/proving-android-java-and-python-sorting-algorithm-is-broken-and-how-to-fix-it/
Proving that Android’s, Java’s and Python’s sorting algorithm is broken (and showing how to fix it) | Envisage: Engineering Virtualized Services