mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-12 11:31:03 +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…
x
Reference in New Issue
Block a user