Skip to content

Commit

Permalink
Compare using __lt__
Browse files Browse the repository at this point in the history
  • Loading branch information
ale-rt committed Mar 27, 2018
1 parent 21ce534 commit 227a240
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/zc/relation/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,8 @@ name as the tokens.
... # the next parts just make the tests prettier
... def __repr__(self):
... return '<Employee instance "' + self.name + '">'
... def __cmp__(self, other):
... # pukes if other doesn't have name
... return cmp(self.name, other.name)
... def __lt__(self, other):
... return self.name < other.name
...

So, we need to define how to turn employees into their tokens. We call the
Expand Down

0 comments on commit 227a240

Please sign in to comment.