[predicates] Simplify range(len()) iteration
authorRémi Cardona <remi.cardona@logilab.fr>
Tue, 15 Sep 2015 16:30:25 +0200
changeset 10599 99e9fe1e633f
parent 10598 b3f9f929385f
child 10600 180aa08cad48
[predicates] Simplify range(len()) iteration
predicates.py
--- a/predicates.py	Mon Sep 14 15:34:09 2015 +0200
+++ b/predicates.py	Tue Sep 15 16:30:25 2015 +0200
@@ -106,7 +106,7 @@
             if accept_none is None:
                 accept_none = self.accept_none
             if not accept_none and \
-                   any(rset[i][col] is None for i in xrange(len(rset))):
+                   any(row[col] is None for row in rset):
                 return 0
             etypes = rset.column_types(col)
         else: