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

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


Author: nicolas.dumazet
Date: Thu Feb 18 09:09:08 2010
New Revision: 32722

URL: http://svn.erp5.org?rev=32722&view=rev
Log:
avoid a few dictionary lookups

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=32722&r1=32721&r2=32722&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] Thu Feb 18 09:09:08 2010
@@ -495,9 +495,10 @@
         return None
 
       i = 0
+      base_item = self.index[base_id]
       for my_id in kw:
-        if self.index[base_id][i].has_key(my_id):
-          cell_id += '_%s' % self.index[base_id][i][my_id]
+        if base_item[i].has_key(my_id):
+          cell_id += '_%s' % base_item[i][my_id]
           i += 1
         else:
           raise KeyError, 'Invalid key: %s' % str(kw)




More information about the Erp5-report mailing list