The Python Tourist: Forgetting how cmp() works!

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.

Issue #3: Forgetting how cmp() works ... no problem!

Reply

The content of this field is kept private and will not be shown publicly.