OK. Now that I have a little more time, here's a bit more thorough implementation. Does it match what the functionality you wanted?
elif v < o:
return False
return False
def __eq__(self, other):
return (self.values == other.values and self.maximize == other.maximize)
def __str__(self):
return str(self.values)
def __repr__(self):
return str(self.values)
if __name__ == '__main__':
a = Lexicographic([1, 2, 3], maximize=True)
b = Lexicographic([1, 3, 2], maximize=True)
c = Lexicographic([2, 1, 3], maximize=True)
d = Lexicographic([2, 3, 1], maximize=True)
e = Lexicographic([3, 1, 2], maximize=True)
f = Lexicographic([3, 2, 1], maximize=True)
u = Lexicographic([1, 2, 3], maximize=False)
v = Lexicographic([1, 3, 2], maximize=False)
w = Lexicographic([2, 1, 3], maximize=False)
x = Lexicographic([2, 3, 1], maximize=False)
y = Lexicographic([3, 1, 2], maximize=False)
z = Lexicographic([3, 2, 1], maximize=False)
for p in [a, b, c, d, e, f]:
for q in [a, b, c, d, e, f]:
print('%s < %s : %s' % (p, q, p < q))
print('----------------------------------------')
for p in [u, v, w, x, y, z]:
for q in [u, v, w, x, y, z]:
print('%s < %s : %s' % (p, q, p < q))