Commit a7c48e44 authored by Jérome Perrin's avatar Jérome Perrin

UserDict already provides a working __cmp__


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42252 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c52d5a22
...@@ -64,17 +64,6 @@ class InventoryKey(UserDict): ...@@ -64,17 +64,6 @@ class InventoryKey(UserDict):
def __hash__(self): def __hash__(self):
return hash(tuple(self.items())) return hash(tuple(self.items()))
def __cmp__(self, other):
# this is basically here so that we can see if two inventory keys are
# equals.
if sorted(self.keys()) != sorted(other.keys()):
return -1
for k, v in self.items():
if v != other[k]:
return -1
return 0
class BalanceTransaction(AccountingTransaction, Inventory): class BalanceTransaction(AccountingTransaction, Inventory):
"""Balance Transaction """Balance Transaction
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment