I think you can get away with defining __cmp__() alone, and then you don't need to define __lt__, __gt__, or __eq__. It's a little less work, and 1/3 the functions to test.