From 6707b95fa68bfd456665aed2530aeb8484efb10d Mon Sep 17 00:00:00 2001 From: Nicolas Dumazet <nicolas.dumazet@nexedi.com> Date: Thu, 18 Feb 2010 08:09:08 +0000 Subject: [PATCH] avoid a few dictionary lookups git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32722 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/XMLMatrix.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/product/ERP5Type/XMLMatrix.py b/product/ERP5Type/XMLMatrix.py index 89fb1ddba3..96e031460e 100644 --- a/product/ERP5Type/XMLMatrix.py +++ b/product/ERP5Type/XMLMatrix.py @@ -495,9 +495,10 @@ class XMLMatrix(Folder): 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) -- 2.30.9