From 9943a685aed7f6149df9d73dcbb03ce3e3829e43 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Thu, 3 Jan 2013 16:06:19 +0100 Subject: [PATCH] [IMP] replace range by xrange to avoid to build the full list when an anticipated break may stop the iteration --- account_easy_reconcile/simple_reconciliation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_easy_reconcile/simple_reconciliation.py b/account_easy_reconcile/simple_reconciliation.py index 16fcb983..14013cd5 100644 --- a/account_easy_reconcile/simple_reconciliation.py +++ b/account_easy_reconcile/simple_reconciliation.py @@ -41,7 +41,7 @@ class easy_reconcile_simple(AbstractModel): count = 0 res = [] while (count < len(lines)): - for i in range(count+1, len(lines)): + for i in xrange(count+1, len(lines)): writeoff_account_id = False if lines[count][self._key_field] != lines[i][self._key_field]: break