cmp is not available in Python 3.