[Erp5-report] r42252 jerome - /erp5/trunk/products/ERP5/Document/BalanceTransaction.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jan 12 11:04:26 CET 2011
Author: jerome
Date: Wed Jan 12 11:04:25 2011
New Revision: 42252
URL: http://svn.erp5.org?rev=42252&view=rev
Log:
UserDict already provides a working __cmp__
Modified:
erp5/trunk/products/ERP5/Document/BalanceTransaction.py
Modified: erp5/trunk/products/ERP5/Document/BalanceTransaction.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/BalanceTransaction.py?rev=42252&r1=42251&r2=42252&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/BalanceTransaction.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/BalanceTransaction.py [utf8] Wed Jan 12 11:04:25 2011
@@ -64,17 +64,6 @@ class InventoryKey(UserDict):
def __hash__(self):
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):
"""Balance Transaction
More information about the Erp5-report
mailing list