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

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Feb 18 09:03:49 CET 2010


Author: nicolas.dumazet
Date: Thu Feb 18 09:03:49 2010
New Revision: 32720

URL: http://svn.erp5.org?rev=32720&view=rev
Log:
list.extend(iterable) is much better than list += [x for x in iterable]

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=32720&r1=32719&r2=32720&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] Thu Feb 18 09:03:49 2010
@@ -479,8 +479,7 @@
       result = []
       for value in cell_range.itervalues():
         result_items = sorted(value.iteritems(), key=lambda x:x[1])
-        result_items = [x[0] for x in result_items]
-        result += [result_items]
+        result.extend(x[0] for x in result_items)
       return result
 
     security.declareProtected( Permissions.ModifyPortalContent, 'newCell' )




More information about the Erp5-report mailing list