[Erp5-report] r32718 nicolas.dumazet - /erp5/trunk/products/ERP5Type/XMLMatrix.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Feb 18 08:59:23 CET 2010


Author: nicolas.dumazet
Date: Thu Feb 18 08:59:22 2010
New Revision: 32718

URL: http://svn.erp5.org?rev=32718&view=rev
Log:
key parameter is more efficient and clear than cmp

Modified:
    erp5/trunk/products/ERP5Type/XMLMatrix.py

Modified: erp5/trunk/products/ERP5Type/XMLMatrix.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/XMLMatrix.py?rev=32718&r1=32717&r2=32718&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] Thu Feb 18 08:59:22 2010
@@ -479,7 +479,7 @@
       result = []
       for value in cell_range.itervalues():
         result_items = value.items()
-        result_items.sort(lambda x, y: x[1]-y[1])
+        result_items.sort(key=lamba x:x[1])
         result_items = [x[0] for x in result_items]
         result += [result_items]
       return result




More information about the Erp5-report mailing list