Can you use something like (untested)
class ComparisonReverser:
def __init__(self, s): self.s = s
def __cmp__(self, o): return cmp(o, self.s)
def __lt__... # or whichever operation hashes use
then use (ComparisonReverser(f(x)), i, x) as the decorated item
instead of (f(x), i, x)Jeff
pgpKui90u477G.pgp
Description: PGP signature
-- http://mail.python.org/mailman/listinfo/python-list
