From 90a4640ec1782dadb782b336054e491c66720b1a Mon Sep 17 00:00:00 2001 From: Nicolas Dumazet <nicolas.dumazet@nexedi.com> Date: Thu, 18 Feb 2010 08:03:49 +0000 Subject: [PATCH] list.extend(iterable) is much better than list += [x for x in iterable] git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32720 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/XMLMatrix.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/product/ERP5Type/XMLMatrix.py b/product/ERP5Type/XMLMatrix.py index 1bdf463851..89fb1ddba3 100644 --- a/product/ERP5Type/XMLMatrix.py +++ b/product/ERP5Type/XMLMatrix.py @@ -479,8 +479,7 @@ class XMLMatrix(Folder): 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' ) -- 2.30.9