Explorar el Código

Fix __iter__ method of the Ilist class, now return an iterator

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55451 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli hace 12 años
padre
commit
fd9f8f6d03
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/python/pygrass/vector/basic.py

+ 1 - 1
lib/python/pygrass/vector/basic.py

@@ -281,7 +281,7 @@ class Ilist(object):
         return self.c_ilist.contents.n_values
 
     def __iter__(self):
-        return [self.c_ilist.contents.value[i] for i in xrange(self.__len__())]
+        return (self.c_ilist.contents.value[i] for i in xrange(self.__len__()))
 
     def __repr__(self):
         return "Ilist(%r)" % repr(self.__iter__())