Duncan Booth <duncan.bo...@invalid.invalid> writes: > > Is there a real-life sorting task that requires (or is far more > > efficient with) cmp and can't be easily achieved with key and reverse? > > > There is no sorting task that *requires* cmp. If all else fails you can > define a key class to wrap the original wrapper such that comparing the > keys simply calls the comparison function that you *would* have used.
I would count that as key being far less efficient, though still giving the same result. -- http://mail.python.org/mailman/listinfo/python-list