Math: implement __lt__ and __eq__ in converter.Unit.

This commit is contained in:
Valentin Lorentz 2012-08-04 20:22:11 +02:00
parent 1be1ddb386
commit 224bdf89e7
1 changed files with 6 additions and 0 deletions

View File

@ -1177,6 +1177,12 @@ class Unit:
def __cmp__(self, other):
return cmp(self.name, other.name)
def __lt__(self, other):
return self.name < other.name
def __eq__(self, other):
return self.name == other.name
############################################################################
# Wrapper functionality
#