[Erp5-report] r32739 nicolas.dumazet - /erp5/trunk/products/ERP5Type/XMLMatrix.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Feb 18 10:41:41 CET 2010
Author: nicolas.dumazet
Date: Thu Feb 18 10:41:39 2010
New Revision: 32739
URL: http://svn.erp5.org?rev=32739&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=32739&r1=32738&r2=32739&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/XMLMatrix.py [utf8] Thu Feb 18 10:41:39 2010
@@ -146,14 +146,12 @@
base_id = kwd.get('base_id', "cell")
if not self.index.has_key(base_id):
return 0
- i = 0
- for my_id in kw:
+ for i, my_id in enumerate(kw):
if self.index[base_id].has_key(i):
if not self.index[base_id][i].has_key(my_id):
return 0
else:
return 0
- i += 1
return 1
More information about the Erp5-report
mailing list