port __cmp__ to python 3 by adding a __lt__ wrapper