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

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Feb 18 10:08:47 CET 2010


Author: nicolas.dumazet
Date: Thu Feb 18 10:08:43 2010
New Revision: 32732

URL: http://svn.erp5.org?rev=32732&view=rev
Log:
use enumerate

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=32732&r1=32731&r2=32732&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] Thu Feb 18 10:08:43 2010
@@ -541,9 +541,9 @@
       index = self.index[base_id]
       cell_id_list = [base_id]
       append = cell_id_list.append
-      for i in xrange(len(kw)):
+      for i, item in enumerate(kw):
         try:
-          append(str(index[i][kw[i]]))
+          append(str(index[i][item]))
         except KeyError:
           return None
       return '_'.join(cell_id_list)




More information about the Erp5-report mailing list