def compareValue(self, other): #simple string comparison if self.getValue().lower() == other.getValue().lower(): return True #otherwise, perform a more complicated value comparison if units.compareValues(self.getValue(), other.getValue()): return True #no match, return False return False