[entities] import range from six.moves
authorJulien Cristau <julien.cristau@logilab.fr>
Thu, 12 Nov 2015 10:53:50 +0100
changeset 10841 84a0505cb70b
parent 10840 5669e136860b
child 10842 76a9fe340ac2
[entities] import range from six.moves
entities/__init__.py
--- a/entities/__init__.py	Thu Nov 12 10:52:28 2015 +0100
+++ b/entities/__init__.py	Thu Nov 12 10:53:50 2015 +0100
@@ -20,6 +20,7 @@
 __docformat__ = "restructuredtext en"
 
 from six import text_type, string_types
+from six.moves import range
 
 from logilab.common.decorators import classproperty
 
@@ -30,7 +31,7 @@
 def chunks(seq, step):
     """See http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks-in-python)"""
     return (seq[i:i+step]
-            for i in xrange(0, len(seq), step))
+            for i in range(0, len(seq), step))
 
 
 class AnyEntity(Entity):