So I'm working with a couple of previous comparators that look at specific qualities in two tuples and return valid if the first is more prominent than the second, bogus assuming in any case. Here's the code for one of them:
def cmpValue(subInfo1, subInfo2):
"""
Returns True if value in (value, work) tuple subInfo1 is GREATER than
value in (value, work) tuple in subInfo2
"""
# TODO...
if subInfo1[0] > subInfo2[0]:
return True
else:
return False
Presently, I have a word reference that has various tuple sections of the sort being analyzed previously. I need to sort them all in the opposite request, yet I don't generally see how I would achieve that. I was thinking something like:
sortedDict = sorted(subjects, key=comparator, reverse = True)
In any case, I don't have the foggiest idea of what to pass into the comparator on the grounds that each comparator takes two contentions (subInfo1, subInfo2). I can't change the comparator capacities.