mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 04:32:36 +01:00
Math: implement __lt__ and __eq__ in converter.Unit.
This commit is contained in:
parent
1be1ddb386
commit
224bdf89e7
@ -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
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user