mirror of
https://github.com/progval/Limnoria.git
synced 2025-05-05 09:50:52 -05: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):
|
def __cmp__(self, other):
|
||||||
return cmp(self.name, other.name)
|
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
|
# Wrapper functionality
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user