3 ms·
But that first comparison function is usually not what you want, you want lexicographic ordering. This very example is in fact discussed in the article, as an e
by BlackFingolfin 7y ago
But that first comparison function is usually not what you want, you want lexicographic ordering. This very example is in fact discussed in the article, as an example to how people often mess this up...
- masklinn 7y ago> But that first comparison function is usually not what you want All those functions implement the same comparison, the first is simply not including the similarly trivial implementation for eq: def __eq__(self, other): return self.a == other.a and self.b == other.b and self.c == other.c > you want lexicographic ordering Every word here makes sense but the objection makes none. What are you trying to say exactly?