It seems like each time I create a class that needs to be sorted, I start trying to remember what the return values from __cmp__() are supposed to be ... forgetting that there is an easy way to avoid this completely.
It seems like each time I create a class that needs to be sorted, I start trying to remember what the return values from __cmp__() are supposed to be ... forgetting that there is an easy way to avoid this completely.